lkml.org 
[lkml]   [2002]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] fix broken topology functions
Linus,
The register_(node|memblk)_driver functions are broken. Pat Mochel
recently updated sysfs to make sure that when you register a driver that
it's associated devclass is already registered. The way node/memblk
registration is done now is backwards and causes panic's on NUMA
systems. Please apply this patch to fix it.
Cheers!

-Matt

diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.50-vanilla/drivers/base/memblk.c linux-2.5.50-topo_ordering/drivers/base/memblk.c
--- linux-2.5.50-vanilla/drivers/base/memblk.c Wed Nov 27 14:36:23 2002
+++ linux-2.5.50-topo_ordering/drivers/base/memblk.c Wed Dec 4 15:50:52 2002
@@ -49,7 +49,7 @@

static int __init register_memblk_type(void)
{
- driver_register(&memblk_driver);
- return devclass_register(&memblk_devclass);
+ devclass_register(&memblk_devclass);
+ return driver_register(&memblk_driver);
}
postcore_initcall(register_memblk_type);
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.50-vanilla/drivers/base/node.c linux-2.5.50-topo_ordering/drivers/base/node.c
--- linux-2.5.50-vanilla/drivers/base/node.c Wed Nov 27 14:35:50 2002
+++ linux-2.5.50-topo_ordering/drivers/base/node.c Wed Dec 4 15:50:52 2002
@@ -93,7 +93,7 @@

static int __init register_node_type(void)
{
- driver_register(&node_driver);
- return devclass_register(&node_devclass);
+ devclass_register(&node_devclass);
+ return driver_register(&node_driver);
}
postcore_initcall(register_node_type);
\
 
 \ /
  Last update: 2005-03-22 13:31    [from the cache]
©2003-2011 Jasper Spaans