]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc64: Add numa=off command line option
authorAndrew Morton <akpm@osdl.org>
Thu, 18 Mar 2004 22:58:43 +0000 (14:58 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 18 Mar 2004 22:58:43 +0000 (14:58 -0800)
From: Anton Blanchard <anton@samba.org>

Add numa=off command line option to disable NUMA support at runtime.
Useful if there are issues with our parsing of the NUMA toplogy or for
testing NUMA gains.

arch/ppc64/mm/numa.c

index fa8d1b9f4911cbd3b569a0882f4ad05810bcbae9..49ee2526070209e75456052715d0d3a18c878480 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/mmzone.h>
 #include <linux/module.h>
 #include <asm/lmb.h>
+#include <asm/machdep.h>
 
 #if 1
 #define dbg(args...) udbg_printf(args)
@@ -65,6 +66,11 @@ static int __init parse_numa_properties(void)
        int depth;
        int max_domain = 0;
 
+       if (strstr(saved_command_line, "numa=off")) {
+               printk(KERN_WARNING "NUMA disabled by user\n");
+               return -1;
+       }
+
        cpu = of_find_node_by_type(NULL, "cpu");
        if (!cpu)
                goto err;