hpet: factor timer allocate from open
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · On Mon, 5 Mar 2012, [email protected] wrote:
From: Magnus Lynch <[email protected]>
Subject: hpet: factor timer allocate from openThe current implementation of the
/dev/hpetdriver 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.
Quoted 3 lines
This patch alters the open semantics so that when the device is opened, no timer is allocated. Operations that depend on a timer being in context implicitly attempt allocating a timer, to maintain backward compatibility.
AFAICT, there is only fasync which calls hpet_alloc_timer(). All other functions are broken by this chage.
Quoted 2 lines
There is also an IOCTL (
HPET_ALLOC_TIMER_IO) added so that the
allocation may be done explicitly. (I prefer the explicit open then
And that IOCTL does what? Return 0 is not really useful functionality.
Thanks,
tglx
Quoted 10 lines · Thomas Gleixner
Quoted 9 lines · On Mon, 5 Mar 2012, [email protected] wrote:
From: Magnus Lynch <[email protected]>
Subject: hpet: factor timer allocate from openThe current implementation of the
/dev/hpetdriver 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.
Quoted 6 lines
Quoted 3 lines
This patch alters the open semantics so that when the device is opened, no timer is allocated. Operations that depend on a timer being in context implicitly attempt allocating a timer, to maintain backward compatibility.
AFAICT, there is only fasync which calls
hpet_alloc_timer(). All other functions are broken by this chage.
Indeed. There was another call in hpet_ioctl_common(), but it appears that one somehow got dropped.
Magnus, is this the patch that you submitted and have tested?
Regards,
Clemens
Quoted 15 lines · On Tue, 06 Mar 2012 16:04:21 +0100 Clemens Ladisch <[email protected]> wrote:
Quoted 14 lines · Thomas Gleixner
Quoted 12 lines · On Mon, 5 Mar 2012, [email protected] wrote:
From: Magnus Lynch <[email protected]>
Subject: hpet: factor timer allocate from openThe current implementation of the
/dev/hpetdriver 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.This patch alters the open semantics so that when the device is opened, no timer is allocated. Operations that depend on a timer being in context implicitly attempt allocating a timer, to maintain backward compatibility.
Quoted 7 lines
Quoted 2 lines
AFAICT, there is only fasync which calls
hpet_alloc_timer(). All other functions are broken by this chage.Indeed. There was another call in
hpet_ioctl_common(), but it appears that one somehow got dropped.Magnus, is this the patch that you submitted and have tested?
I've been carrying this patch since March 2010 - perhaps it rotted.