extern void numa_init_array(void);
extern bool numa_off;
-
-extern int srat_disabled(void);
+extern int arch_numa_setup(const char *opt);
+extern bool arch_numa_disabled(void);
+extern bool srat_disabled(void);
extern void numa_set_node(int cpu, nodeid_t node);
extern nodeid_t setup_node(unsigned int pxm);
extern void srat_detect_node(int cpu);
bool numa_off;
s8 acpi_numa = 0;
-int srat_disabled(void)
+int __init arch_numa_setup(const char *opt)
{
- return numa_off || acpi_numa < 0;
+#ifdef CONFIG_ACPI_NUMA
+ if ( !strncmp(opt, "noacpi", 6) )
+ {
+ numa_off = false;
+ acpi_numa = -1;
+ return 0;
+ }
+#endif
+
+ return -EINVAL;
+}
+
+bool arch_numa_disabled(void)
+{
+ return acpi_numa < 0;
+}
+
+bool srat_disabled(void)
+{
+ return numa_off || arch_numa_disabled();
}
/*
/* [numa=off] */
static int __init cf_check numa_setup(const char *opt)
{
- if ( !strncmp(opt,"off",3) )
+ if ( !strncmp(opt, "off", 3) )
numa_off = true;
- else if ( !strncmp(opt,"on",2) )
+ else if ( !strncmp(opt, "on", 2) )
numa_off = false;
#ifdef CONFIG_NUMA_EMU
else if ( !strncmp(opt, "fake=", 5) )
{
numa_off = false;
- numa_fake = simple_strtoul(opt+5,NULL,0);
+ numa_fake = simple_strtoul(opt + 5, NULL, 0);
if ( numa_fake >= MAX_NUMNODES )
numa_fake = MAX_NUMNODES;
}
-#endif
-#ifdef CONFIG_ACPI_NUMA
- else if ( !strncmp(opt,"noacpi",6) )
- {
- numa_off = false;
- acpi_numa = -1;
- }
#endif
else
- return -EINVAL;
+ return arch_numa_setup(opt);
return 0;
}