From 6525afdf53b39968f1a109b1ce1607ca6c98d300 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Tue, 24 May 2016 15:35:35 -0700 Subject: ACPI / NUMA: move acpi_numa_slit_init() to drivers/acpi/numa.c Identical implementations of acpi_numa_slit_init() are used by both x86 and follow-on arm64 support. Move it to drivers/acpi/numa.c, and guard with CONFIG_X86 || CONFIG_ARM64 because ia64 has its own architecture specific implementation. No code change. Signed-off-by: Hanjun Guo Signed-off-by: Robert Richter Signed-off-by: David Daney Signed-off-by: Rafael J. Wysocki --- arch/x86/mm/srat.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'arch/x86/mm/srat.c') diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 90b6ed9..f242a11 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm/srat.c @@ -42,33 +42,6 @@ static __init inline int srat_disabled(void) return acpi_numa < 0; } -/* - * Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for - * I/O localities since SRAT does not list them. I/O localities are - * not supported at this point. - */ -void __init acpi_numa_slit_init(struct acpi_table_slit *slit) -{ - int i, j; - - for (i = 0; i < slit->locality_count; i++) { - const int from_node = pxm_to_node(i); - - if (from_node == NUMA_NO_NODE) - continue; - - for (j = 0; j < slit->locality_count; j++) { - const int to_node = pxm_to_node(j); - - if (to_node == NUMA_NO_NODE) - continue; - - numa_set_distance(from_node, to_node, - slit->entry[slit->locality_count * i + j]); - } - } -} - /* Callback for Proximity Domain -> x2APIC mapping */ void __init acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) -- cgit v1.1