Skip to contentSkip to conversation

hpet: factor timer allocate from open

PATCH Thomas Gleixner 3 participants 3 messages Jul 23, 2010 – Jul 26, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · On Tue, 20 Jul 2010, [email protected] wrote:

From: Magnus Lynch <[email protected]>

The current implementation of the /dev/hpet driver couples opening the device with allocating one of the (scarce) timers (aka comparators). This is a limitation in that the main counter may be valuable to applications seeking a high-resolution timer who have no use for the interrupt generating functionality of the comparators.

And how exactly does this patch provide such functionality ? There is no interface which allows you to access the counter itself. All what this patch does is removing the allocation from open() and sprinkle the allocation all over the place for _ZERO_ benefit.

I really have a hard time to understand why anything would open /dev/hpet just to do nothing with it.

Thanks,

tglx

#2 lore raw
Quoted 11 lines · Thomas Gleixner
Quoted 7 lines · On Tue, 20 Jul 2010, [email protected] wrote:

From: Magnus Lynch <[email protected]>

The current implementation of the /dev/hpet driver couples opening the device with allocating one of the (scarce) timers (aka comparators). This is a limitation in that the main counter may be valuable to applications seeking a high-resolution timer who have no use for the interrupt generating functionality of the comparators.

And how exactly does this patch provide such functionality ? There is no interface which allows you to access the counter itself.

Through mmap(); this is the only interface of /dev/hpet that is actually used in practice.

Quoted 1 line
Cc Clemens Ladisch <[email protected]>

Regards,
Clemens

#3 lore raw
In reply to Thomas Gleixner
Quoted 2 lines · Thomas Gleixner

And how exactly does this patch provide such functionality ? There is no interface which allows you to access the counter itself.

Yes there is, mmap allows you access the registers.