public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* HPET mmap() problem
@ 2009-03-14 22:20 Jussi Laako
  2009-03-16 10:01 ` Clemens Ladisch
  0 siblings, 1 reply; 2+ messages in thread
From: Jussi Laako @ 2009-03-14 22:20 UTC (permalink / raw)
  To: linux-kernel

Hi,

In the JACK audio connection kit we have support for mmap() of /dev/hpet
as our time source (as one of the possibilities). However, there's a
nasty issue with the current driver as it reserves one of the three
comparator-timers per each open() and denies further opens when the
timers are exhausted. And in case it's already used as a system clock
source, two of the timers are already reserved...

However, we are only interested on the main counter value, and would
like to have unlimited access from number of processes to this value
through mmap() of the device.

Any ideas/recommendations/suggestions on which way to change the driver
to support this? Or even better, if someone is already working on this?


Best regards,

	- Jussi

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: HPET mmap() problem
  2009-03-14 22:20 HPET mmap() problem Jussi Laako
@ 2009-03-16 10:01 ` Clemens Ladisch
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2009-03-16 10:01 UTC (permalink / raw)
  To: Jussi Laako; +Cc: linux-kernel

Jussi Laako wrote:
> In the JACK audio connection kit we have support for mmap() of /dev/hpet
> as our time source (as one of the possibilities). However, there's a
> nasty issue with the current driver as it reserves one of the three
> comparator-timers per each open() and denies further opens when the
> timers are exhausted. And in case it's already used as a system clock
> source, two of the timers are already reserved...
> 
> However, we are only interested on the main counter value, and would
> like to have unlimited access from number of processes to this value
> through mmap() of the device.
> 
> Any ideas/recommendations/suggestions on which way to change the driver
> to support this?

Don't allocate a hpet_dev in hpet_open but when hpet_ioctl is called for
the first time.

> Or even better, if someone is already working on this?

I'm planning to work on this.


HTH
Clemens

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-16 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-14 22:20 HPET mmap() problem Jussi Laako
2009-03-16 10:01 ` Clemens Ladisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox