public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
@ 2006-03-06 21:59 Jesper Juhl
  2006-03-06 22:08 ` Andrew Morton
  2006-03-06 22:16 ` Randy.Dunlap
  0 siblings, 2 replies; 8+ messages in thread
From: Jesper Juhl @ 2006-03-06 21:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On 3/3/06, Andrew Morton <akpm@osdl.org> wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc5/2.6.16-rc5-mm2/
>

With this kernel I sometimes get :
  initcall at 0xc0432790: rng_init+0x0/0xa0(): returned with error code -19
and sometimes :
  initcall at 0xc0428240: init_hpet_clocksource+0x0/0x90(): returned
with error code -19

I haven't paid enough attention to be able to say if some boots had
other variations, but at least the two above have been observed.

2.6.16-rc5-git8 is fine.

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

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

* Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
  2006-03-06 21:59 initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2) Jesper Juhl
@ 2006-03-06 22:08 ` Andrew Morton
  2006-03-06 22:13   ` Jesper Juhl
  2006-03-07  1:09   ` Paul Jackson
  2006-03-06 22:16 ` Randy.Dunlap
  1 sibling, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2006-03-06 22:08 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel

"Jesper Juhl" <jesper.juhl@gmail.com> wrote:
>
> On 3/3/06, Andrew Morton <akpm@osdl.org> wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc5/2.6.16-rc5-mm2/
> >
> 
> With this kernel I sometimes get :
>   initcall at 0xc0432790: rng_init+0x0/0xa0(): returned with error code -19
> and sometimes :
>   initcall at 0xc0428240: init_hpet_clocksource+0x0/0x90(): returned
> with error code -19
> 
> I haven't paid enough attention to be able to say if some boots had
> other variations, but at least the two above have been observed.
> 

That's OK - it's -ENODEV.  It's saying "hey, you linked this driver into
vmlinux but it didn't find any hardware to drive".

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

* Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
  2006-03-06 22:08 ` Andrew Morton
@ 2006-03-06 22:13   ` Jesper Juhl
  2006-03-07  1:09   ` Paul Jackson
  1 sibling, 0 replies; 8+ messages in thread
From: Jesper Juhl @ 2006-03-06 22:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On 3/6/06, Andrew Morton <akpm@osdl.org> wrote:
> "Jesper Juhl" <jesper.juhl@gmail.com> wrote:
> >
> > On 3/3/06, Andrew Morton <akpm@osdl.org> wrote:
> > >
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc5/2.6.16-rc5-mm2/
> > >
> >
> > With this kernel I sometimes get :
> >   initcall at 0xc0432790: rng_init+0x0/0xa0(): returned with error code -19
> > and sometimes :
> >   initcall at 0xc0428240: init_hpet_clocksource+0x0/0x90(): returned
> > with error code -19
> >
> > I haven't paid enough attention to be able to say if some boots had
> > other variations, but at least the two above have been observed.
> >
>
> That's OK - it's -ENODEV.  It's saying "hey, you linked this driver into
> vmlinux but it didn't find any hardware to drive".
>

Hmm, then perhaps we should make the warnings print some slightly less
"bad things happening" looking string...
As it is it looks very much like something bad is going on, so I
predict it will generate a lot of bug reports in the future if left in
its current form.

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

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

* Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
  2006-03-06 21:59 initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2) Jesper Juhl
  2006-03-06 22:08 ` Andrew Morton
@ 2006-03-06 22:16 ` Randy.Dunlap
  1 sibling, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2006-03-06 22:16 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: akpm, linux-kernel

On Mon, 6 Mar 2006 22:59:56 +0100 Jesper Juhl wrote:

> On 3/3/06, Andrew Morton <akpm@osdl.org> wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc5/2.6.16-rc5-mm2/
> >
> 
> With this kernel I sometimes get :
>   initcall at 0xc0432790: rng_init+0x0/0xa0(): returned with error code -19
> and sometimes :
>   initcall at 0xc0428240: init_hpet_clocksource+0x0/0x90(): returned
> with error code -19
> 
> I haven't paid enough attention to be able to say if some boots had
> other variations, but at least the two above have been observed.
> 
> 2.6.16-rc5-git8 is fine.

Andrew added some initcall error detection messages.
-19 is just -ENODEV.  No big deal except maybe the messages themselves. :)
You don't have a RNG or HPET device...

---
~Randy

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

* Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
  2006-03-06 22:08 ` Andrew Morton
  2006-03-06 22:13   ` Jesper Juhl
@ 2006-03-07  1:09   ` Paul Jackson
  2006-03-07 13:10     ` Jes Sorensen
  1 sibling, 1 reply; 8+ messages in thread
From: Paul Jackson @ 2006-03-07  1:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: jesper.juhl, linux-kernel

Andrew wrote:
> That's OK - it's -ENODEV. 

I can't help but wonder if the particular case of -ENODEV should
be kept quiet, as in the following totally untested patch:

diff -Naurp 2.6.16-rc5-mm2.orig/init/main.c 2.6.16-rc5-mm2/init/main.c
--- 2.6.16-rc5-mm2.orig/init/main.c	2006-03-06 17:02:46.491860190 -0800
+++ 2.6.16-rc5-mm2/init/main.c	2006-03-06 17:07:29.754830844 -0800
@@ -608,7 +608,8 @@ static void __init do_initcalls(void)
 
 		result = (*call)();
 
-		if (result) {
+		/* don't mind -ENODEV - just a driver w/o hardware */
+		if (result && result != -ENODEV) {
 			sprintf(msgbuf, "error code %d", result);
 			msg = msgbuf;
 		}

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

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

* Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
  2006-03-07  1:09   ` Paul Jackson
@ 2006-03-07 13:10     ` Jes Sorensen
  2006-03-07 17:31       ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: Jes Sorensen @ 2006-03-07 13:10 UTC (permalink / raw)
  To: Paul Jackson; +Cc: Andrew Morton, jesper.juhl, linux-kernel

>>>>> "Paul" == Paul Jackson <pj@sgi.com> writes:

Paul> Andrew wrote:
>> That's OK - it's -ENODEV.

Paul> I can't help but wonder if the particular case of -ENODEV should
Paul> be kept quiet, as in the following totally untested patch:

I'd subscribe to that. It seems a bit wrong to return 0 in a
loadable module if nothing is found, and some of the ones people have
posted patches for converting can be either modules or static.

Cheers,
Jes

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

* Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
  2006-03-07 17:31       ` Bjorn Helgaas
@ 2006-03-07 17:30         ` Jes Sorensen
  0 siblings, 0 replies; 8+ messages in thread
From: Jes Sorensen @ 2006-03-07 17:30 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Paul Jackson, Andrew Morton, jesper.juhl, linux-kernel

Bjorn Helgaas wrote:
> On Tuesday 07 March 2006 06:10, Jes Sorensen wrote:
>> I'd subscribe to that. It seems a bit wrong to return 0 in a
>> loadable module if nothing is found, and some of the ones people have
>> posted patches for converting can be either modules or static.
> 
> Yeah, maybe.  But it feels a little like the question of whether
> {pci,pnp,acpi_bus}_register_driver() should return the number of
> devices found.  The consensus is that these functions should return
> only a negative error, or zero for success, leaving any counting of
> devices to the driver's .probe() or .add() method.
> 
> I think a loadable driver's init function *should* return success
> even if no device is yet present.  Maybe you want to load the driver
> before hot-adding the device.

I don't really like this ;-( If a driver is loaded for a specific PCI
device and that isn't present, then IMHO it is better to have it
return -ENODEV and unload it again.

Cheers,
Jes

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

* Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
  2006-03-07 13:10     ` Jes Sorensen
@ 2006-03-07 17:31       ` Bjorn Helgaas
  2006-03-07 17:30         ` Jes Sorensen
  0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2006-03-07 17:31 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: Paul Jackson, Andrew Morton, jesper.juhl, linux-kernel

On Tuesday 07 March 2006 06:10, Jes Sorensen wrote:
> >>>>> "Paul" == Paul Jackson <pj@sgi.com> writes:
> Paul> Andrew wrote:
> >> That's OK - it's -ENODEV.
> 
> Paul> I can't help but wonder if the particular case of -ENODEV should
> Paul> be kept quiet, as in the following totally untested patch:
> 
> I'd subscribe to that. It seems a bit wrong to return 0 in a
> loadable module if nothing is found, and some of the ones people have
> posted patches for converting can be either modules or static.

Yeah, maybe.  But it feels a little like the question of whether
{pci,pnp,acpi_bus}_register_driver() should return the number of
devices found.  The consensus is that these functions should return
only a negative error, or zero for success, leaving any counting of
devices to the driver's .probe() or .add() method.

I think a loadable driver's init function *should* return success
even if no device is yet present.  Maybe you want to load the driver
before hot-adding the device.

The common idiom of, e.g.,

    static int __init serial8250_pci_init(void)
    {
        return pci_register_driver(&serial_pci_driver);
    }

should remain acceptable, though it returns 0 even if no devices
are found.

Bjorn

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

end of thread, other threads:[~2006-03-07 17:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-06 21:59 initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2) Jesper Juhl
2006-03-06 22:08 ` Andrew Morton
2006-03-06 22:13   ` Jesper Juhl
2006-03-07  1:09   ` Paul Jackson
2006-03-07 13:10     ` Jes Sorensen
2006-03-07 17:31       ` Bjorn Helgaas
2006-03-07 17:30         ` Jes Sorensen
2006-03-06 22:16 ` Randy.Dunlap

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