Patchwork Sunfire V880 and 480R 2.6.27.x startup hangs

login
register
mail settings
Submitter David Miller
Date Jan. 28, 2009, 6:29 a.m.
Message ID <20090127.222910.60111568.davem@davemloft.net>
Download mbox | patch
Permalink /patch/20569/
State RFC
Delegated to: David Miller
Headers show

Comments

David Miller - Jan. 28, 2009, 6:29 a.m.
From: Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de>
Date: Mon, 26 Jan 2009 11:04:39 +0100

> [   48.965131] calling  of_bus_driver_init+0x0/0x104
> [   49.021376] Setting up of bus

Strance, here is a patch to get some more information.

Please add this patch on top of what you have so far
and reboot.

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hermann Lauer - Jan. 28, 2009, 8:45 a.m.
On Tue, Jan 27, 2009 at 10:29:10PM -0800, David Miller wrote:
> From: Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de>
> Date: Mon, 26 Jan 2009 11:04:39 +0100
> 
> > [   48.965131] calling  of_bus_driver_init+0x0/0x104
> > [   49.021376] Setting up of bus
> 
> Strance, here is a patch to get some more information.

It's hanging in kset_register. Does this ring a bell to you ?
Will move the full output to the usual place. Thanks.

[   46.994534] calling  random32_init+0x0/0xf0
[   47.044539] initcall random32_init+0x0/0xf0 returned 0 after 0 msecs
[   47.120582] calling  sock_init+0x0/0x64
[   47.166520] initcall sock_init+0x0/0x64 returned 0 after 0 msecs
[   47.238297] calling  netpoll_init+0x0/0x30
[   47.287256] initcall netpoll_init+0x0/0x30 returned 0 after 0 msecs
[   47.362256] calling  netlink_proto_init+0x0/0x238
[   47.418529] NET: Registered protocol family 16
[   47.471670] initcall netlink_proto_init+0x0/0x238 returned 0 after 3 msecs
[   47.553935] calling  of_bus_driver_init+0x0/0x12c
[   47.610180] Setting up of bus
[   47.645596] In bus_register().
[   47.682056] Doing kobject_set_name()
[   47.724764] kset_register()

Patch

diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index 100ebd5..031efa2 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -853,16 +853,19 @@  static int __init of_bus_driver_init(voi
 
 	printk(KERN_ERR "Setting up of bus\n");
 	err = of_bus_type_init(&of_platform_bus_type, "of");
+	printk(KERN_ERR "of_bus_type_init() returns %d\n", err);
 #ifdef CONFIG_PCI
 	if (!err) {
 		printk(KERN_ERR "Setting up ebus bus\n");
 		err = of_bus_type_init(&ebus_bus_type, "ebus");
+		printk(KERN_ERR "of_bus_type_init() returns %d\n", err);
 	}
 #endif
 #ifdef CONFIG_SBUS
 	if (!err) {
 		printk(KERN_ERR "Setting up sbus bus\n");
 		err = of_bus_type_init(&sbus_bus_type, "sbus");
+		printk(KERN_ERR "of_bus_type_init() returns %d\n", err);
 	}
 #endif
 
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index ef522ae..427f582 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -869,57 +869,77 @@  int bus_register(struct bus_type *bus)
 	int retval;
 	struct bus_type_private *priv;
 
+	printk(KERN_ERR "In bus_register().\n");
 	priv = kzalloc(sizeof(struct bus_type_private), GFP_KERNEL);
-	if (!priv)
+	if (!priv) {
+		printk(KERN_ERR "priv allocation failed\n");
 		return -ENOMEM;
+	}
 
 	priv->bus = bus;
 	bus->p = priv;
 
 	BLOCKING_INIT_NOTIFIER_HEAD(&priv->bus_notifier);
 
+	printk(KERN_ERR "Doing kobject_set_name()\n");
 	retval = kobject_set_name(&priv->subsys.kobj, "%s", bus->name);
-	if (retval)
+	if (retval) {
+		printk(KERN_ERR "Failed with err %d\n", retval);
 		goto out;
+	}
 
 	priv->subsys.kobj.kset = bus_kset;
 	priv->subsys.kobj.ktype = &bus_ktype;
 	priv->drivers_autoprobe = 1;
 
+	printk(KERN_ERR "kset_register()\n");
 	retval = kset_register(&priv->subsys);
-	if (retval)
+	if (retval) {
+		printk(KERN_ERR "Failed with err %d\n", retval);
 		goto out;
+	}
 
+	printk(KERN_ERR "bus_create_file(bus, &bus_attr_uevent)\n");
 	retval = bus_create_file(bus, &bus_attr_uevent);
-	if (retval)
+	if (retval) {
+		printk(KERN_ERR "Failed with err %d\n", retval);
 		goto bus_uevent_fail;
-
+	}
+	printk(KERN_ERR "kset_create_and_add(devices)\n");
 	priv->devices_kset = kset_create_and_add("devices", NULL,
 						 &priv->subsys.kobj);
 	if (!priv->devices_kset) {
 		retval = -ENOMEM;
+		printk(KERN_ERR "Failed with err %d\n", retval);
 		goto bus_devices_fail;
 	}
 
+	printk(KERN_ERR "kset_create_and_add(drivers)\n");
 	priv->drivers_kset = kset_create_and_add("drivers", NULL,
 						 &priv->subsys.kobj);
 	if (!priv->drivers_kset) {
 		retval = -ENOMEM;
+		printk(KERN_ERR "Failed with err %d\n", retval);
 		goto bus_drivers_fail;
 	}
 
 	klist_init(&priv->klist_devices, klist_devices_get, klist_devices_put);
 	klist_init(&priv->klist_drivers, NULL, NULL);
 
+	printk(KERN_ERR "add_probe_files()\n");
 	retval = add_probe_files(bus);
-	if (retval)
+	if (retval) {
+		printk(KERN_ERR "Failed with err %d\n", retval);
 		goto bus_probe_files_fail;
-
+	}
+	printk(KERN_ERR "bus_add_attrs()\n");
 	retval = bus_add_attrs(bus);
-	if (retval)
+	if (retval) {
+		printk(KERN_ERR "Failed with err %d\n", retval);
 		goto bus_attrs_fail;
-
+	}
 	pr_debug("bus: '%s': registered\n", bus->name);
+	printk(KERN_ERR "Success\n");
 	return 0;
 
 bus_attrs_fail: