[PATCH] fix character subsystem initialisation panic

James Bottomley (James.Bottomley@steeleye.com)
08 Jun 2003 12:35:25 -0500


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-9501-1055094138-0001-2
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

In 2.5.70 bk latest, I'm getting a panic related to character device
initialisation. The problem seems to be that the new sysfs entries for
character devices require that everything now have a properly
initialised parent. However, the character subsystem is set up in
drivers/char/mem.c as

__initcall(chr_dev_init);

However, __initcall() is the same priority as module_init(), so whether
character devices are initialised before their required subsystem
depends purely on link ordering (on parisc, we initialise devices/parisc
before everything else, so it is panicing reliably with this).

I think the fix is to convert the __initcall to subsys_initcall (patch
attached). The patch allows parisc to boot properly now.

James

--=_courier-9501-1055094138-0001-2
Content-Type: text/plain; name="tmp.diff"; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=tmp.diff

=3D=3D=3D=3D=3D drivers/char/mem.c 1.39 vs edited =3D=3D=3D=3D=3D
--- 1.39/drivers/char/mem.c Fri Jun 6 01:36:40 2003
+++ edited/drivers/char/mem.c Sun Jun 8 12:02:24 2003
@@ -713,4 +713,4 @@
return 0;
}
=20
-__initcall(chr_dev_init);
+subsys_initcall(chr_dev_init);

--=_courier-9501-1055094138-0001-2--