Re: [PATCH] RTC: Add mmap method to rtc character driver

Neil Horman
2006-07-29T21:47:25Z

On Sat, Jul 29, 2006 at 01:41:07PM -0700, Bill Huey wrote:
> On Sat, Jul 29, 2006 at 08:54:27AM -0400, Neil Horman wrote:
> > On Fri, Jul 28, 2006 at 09:28:20PM -0700, Bill Huey wrote:
> > > Not to poop on people's parade, but the last time I looked /dev/rtc was
> > > a single instance device, right ? If this reasoning is true, then mplayer
> > > and other apps that want to open it can't.
> > >
> > > What's the story with this ?
> > >
> > Its always been the case. Its hardware can only support one timer (or at least
> > one timer period), and as such multiple users would interefere with each other.
>
> Well, this points out a serious problem with doing an mmap extension to
> /dev/rtc. It would be better to have a page mapped by another device like
Not really. The rtc driver can only have a single user regardless of weather or
not it has an mmap interface. using mmap just provides another mothod for
accessing the rtc.

> /dev/jiffy_counter, or something like that rather than to overload the
> /dev/rtc with that functionality. The semantic for this change is shadey
> in the first place so you should consider that option. It basically means
> that, if Xorg, adopts this interface, no userspace applications can get at
> and use the 'rtc' for any existing purposes with X running (mplayer and
> friends).
>
> It's not a really usable interface for Keith's purposes because of this
> and it is a serious problem. You might want to consider writting special
I think that was the consensus quite some time ago. :).

> device to do this like I mentioned above instead of mmap extension to
> 'rtc'.
Sure, an mmaped jiffy counter would certainly be usefull. I think the only
thing left to be determined in this thread is if adding mmap to the rtc driver
has any merit regardless of any potential users (iow, would current users of
/dev/rtc find it helpful to have the rtc driver provide an mmap interface.)

Regards
Neil

>
> bill
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/