All of lore.kernel.org
 help / color / mirror / Atom feed
* /sys/devices/system/timer registered twice
@ 2004-11-09 19:30 Kay Sievers
  2004-11-09 19:39 ` Greg KH
  2004-11-09 22:52 ` Greg KH
  0 siblings, 2 replies; 12+ messages in thread
From: Kay Sievers @ 2004-11-09 19:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg KH

Hi,
I got this on a Centrino box with the latest bk:

  [kay@pim linux.kay]$ ls -l /sys/devices/system/
  total 0
  drwxr-xr-x  7 root root 0 Nov  8 15:12 .
  drwxr-xr-x  5 root root 0 Nov  8 15:12 ..
  drwxr-xr-x  3 root root 0 Nov  8 15:12 cpu
  drwxr-xr-x  3 root root 0 Nov  8 15:12 i8259
  drwxr-xr-x  2 root root 0 Nov  8 15:12 ioapic
  drwxr-xr-x  3 root root 0 Nov  8 15:12 irqrouter
  ?---------  ? ?    ?    ?            ? timer


It is caused by registering two devices with the name "timer" from:

  arch/i386/kernel/time.c
  arch/i386/kernel/timers/timer_pit.c

If I change one of the names, I get two correct looking sysfs entries.

Greg, shouldn't the driver core prevent the corruption of the first
device if another one tries to register with the same name?

Thanks,
Kay

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: /sys/devices/system/timer registered twice
@ 2004-11-09 23:41 Pallipadi, Venkatesh
  2004-11-09 23:44 ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Pallipadi, Venkatesh @ 2004-11-09 23:41 UTC (permalink / raw)
  To: dtor_core, Greg KH; +Cc: Kay Sievers, linux-kernel

 

>-----Original Message-----
>From: linux-kernel-owner@vger.kernel.org 
>[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of 
>Dmitry Torokhov
>Sent: Tuesday, November 09, 2004 3:19 PM
>To: Greg KH
>Cc: Kay Sievers; linux-kernel@vger.kernel.org
>Subject: Re: /sys/devices/system/timer registered twice
>
>On Tue, 9 Nov 2004 14:52:45 -0800, Greg KH <greg@kroah.com> wrote:
>> 
>> 
>> On Tue, Nov 09, 2004 at 08:30:43PM +0100, Kay Sievers wrote:
>> > Hi,
>> > I got this on a Centrino box with the latest bk:
>> >
>> >   [kay@pim linux.kay]$ ls -l /sys/devices/system/
>> >   total 0
>> >   drwxr-xr-x  7 root root 0 Nov  8 15:12 .
>> >   drwxr-xr-x  5 root root 0 Nov  8 15:12 ..
>> >   drwxr-xr-x  3 root root 0 Nov  8 15:12 cpu
>> >   drwxr-xr-x  3 root root 0 Nov  8 15:12 i8259
>> >   drwxr-xr-x  2 root root 0 Nov  8 15:12 ioapic
>> >   drwxr-xr-x  3 root root 0 Nov  8 15:12 irqrouter
>> >   ?---------  ? ?    ?    ?            ? timer
>> >
>> >
>> > It is caused by registering two devices with the name "timer" from:
>> >
>> >   arch/i386/kernel/time.c
>> >   arch/i386/kernel/timers/timer_pit.c
>> >
>> > If I change one of the names, I get two correct looking 
>sysfs entries.
>> >
>> > Greg, shouldn't the driver core prevent the corruption of the first
>> > device if another one tries to register with the same name?
>> 
>> Hm, this looks like an issue for Dmitry, as there shouldn't be too
>> sysdev_class structures with the same name, right?
>> 
>
>I agree, but I think you got the wrong man here ;) You need to talk to
>Venkatesh.
>
>http://linux.bkbits.net:8080/linux-2.5/cset@41810e4aGZ0E5bn_hMb
>4JgIY5u90zA?nav=index.html|src/.|src/arch|src/arch/i386|src/arc
>h/i386/kernel|related/arch/i386/kernel/time.c
>

Yes. It was me :(.

But, do we really need two system devices for timers?. I feel 
we can call setup_pit_timer from time.c, whenever pit is being used.
Otherwise, we may have more issues like the order in which these 
two resumes are called and the like.

Thanks,
Venki 

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: /sys/devices/system/timer registered twice
@ 2004-11-09 23:48 Pallipadi, Venkatesh
  0 siblings, 0 replies; 12+ messages in thread
From: Pallipadi, Venkatesh @ 2004-11-09 23:48 UTC (permalink / raw)
  To: Greg KH; +Cc: dtor_core, Kay Sievers, linux-kernel

>-----Original Message-----
>From: Greg KH [mailto:greg@kroah.com] 
>Sent: Tuesday, November 09, 2004 3:44 PM
>To: Pallipadi, Venkatesh
>Cc: dtor_core@ameritech.net; Kay Sievers; linux-kernel@vger.kernel.org
>Subject: Re: /sys/devices/system/timer registered twice
>
>On Tue, Nov 09, 2004 at 03:41:51PM -0800, Pallipadi, Venkatesh wrote:
>> 
>> But, do we really need two system devices for timers?. I feel 
>> we can call setup_pit_timer from time.c, whenever pit is being used.
>> Otherwise, we may have more issues like the order in which these 
>> two resumes are called and the like.
>
>I have no idea.  Why not work this out with the other system device
>authors, as it's obvious people will have both of them loaded at the
>same time.
>

Agreed. We can change the name of the one in timer_pit.c to timer_pit 
for now. That will fix the immediate breakage.
I will try to come up with a patch to combine the two, soon.

Thanks,
Venki

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

end of thread, other threads:[~2004-11-12 21:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-09 19:30 /sys/devices/system/timer registered twice Kay Sievers
2004-11-09 19:39 ` Greg KH
2004-11-10  2:25   ` Kay Sievers
2004-11-10 22:36     ` Maneesh Soni
2004-11-11  0:12       ` Kay Sievers
2004-11-12 20:50       ` Greg KH
2004-11-09 22:52 ` Greg KH
2004-11-09 23:19   ` Dmitry Torokhov
2004-11-09 23:30     ` [PATCH] timer: fix up problem where two sysdev_class devices had the same name Greg KH
2004-11-09 23:41 /sys/devices/system/timer registered twice Pallipadi, Venkatesh
2004-11-09 23:44 ` Greg KH
2004-11-09 23:48 Pallipadi, Venkatesh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.