summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/acpi.h1
-rw-r--r--arch/x86/kernel/setup.c2
-rw-r--r--arch/x86/mm/srat_64.c10
3 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 4e5dff9..06fb786 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -187,6 +187,7 @@ struct bootnode;
extern int acpi_numa;
extern void acpi_get_nodes(struct bootnode *physnodes, unsigned long start,
unsigned long end);
+extern int x86_acpi_numa_init(void);
extern int acpi_scan_nodes(void);
#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 96810a3..c9a139c 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -995,7 +995,7 @@ void __init setup_arch(char **cmdline_p)
/*
* Parse SRAT to discover nodes.
*/
- acpi = !acpi_numa_init();
+ acpi = !x86_acpi_numa_init();
#endif
#ifdef CONFIG_AMD_NUMA
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index 4f9dbf0..56b9263 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -358,6 +358,16 @@ void __init acpi_get_nodes(struct bootnode *physnodes, unsigned long start,
}
#endif /* CONFIG_NUMA_EMU */
+int __init x86_acpi_numa_init(void)
+{
+ int ret;
+
+ ret = acpi_numa_init();
+ if (ret < 0)
+ return ret;
+ return srat_disabled() ? -EINVAL : 0;
+}
+
/* Use the information discovered above to actually set up the nodes. */
int __init acpi_scan_nodes(void)
{