Skip to contentSkip to conversation

x86/acpi: remove have_arch_parse_srat

PATCH New Yinghai Lu 1 participant 2 messages Jul 3, 2008

Subsystems (3)
lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 x86/acpi: remove have_arch_parse_srat

we already have the same srat handling interface for 32bit.

---
 arch/ia64/Kconfig          |    4 ----
 arch/x86/Kconfig           |    4 ----
 arch/x86/mm/discontig_32.c |   17 -----------------
 drivers/acpi/numa.c        |    4 ----
 include/linux/acpi.h       |    3 +--
 5 files changed, 1 insertion(+), 31 deletions(-)
arch/ia64/Kconfig +0 -4
Index: linux-2.6/arch/ia64/Kconfig
===================================================================
@@ -60,10 +60,6 @@ config RWSEM_XCHGADD_ALGORITHM
 	bool
 	default y
 
-config HAVE_ARCH_PARSE_SRAT
-	bool
-	default y
-
 config ARCH_HAS_ILOG2_U32
 	bool
 	default n
arch/x86/Kconfig +0 -4
Index: linux-2.6/arch/x86/Kconfig
===================================================================
@@ -465,10 +465,6 @@ config ACPI_SRAT
 	depends on X86_32 && ACPI && NUMA && X86_GENERICARCH
 	select ACPI_NUMA
 
-config HAVE_ARCH_PARSE_SRAT
-	def_bool y
-	depends on ACPI_SRAT
-
 config X86_SUMMIT_NUMA
 	def_bool y
 	depends on X86_32 && NUMA && X86_GENERICARCH
arch/x86/mm/discontig_32.c +0 -17
Index: linux-2.6/arch/x86/mm/discontig_32.c
===================================================================
@@ -443,20 +443,3 @@ int memory_add_physaddr_to_nid(u64 addr)
 EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
 #endif
 
-#if defined(CONFIG_ACPI_NUMA) && !defined(CONFIG_HAVE_ARCH_PARSE_SRAT)
-/*
- * Dummy on 32-bit, for now:
- */
-void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
-{
-}
-
-void __init
-acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
-{
-}
-
-void __init acpi_numa_arch_fixup(void)
-{
-}
-#endif
drivers/acpi/numa.c +0 -4
Index: linux-2.6/drivers/acpi/numa.c
===================================================================
@@ -207,7 +207,6 @@ acpi_parse_processor_affinity(struct acp
 	return 0;
 }
 
-#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT
 static int __init
 acpi_parse_memory_affinity(struct acpi_subtable_header * header,
 			   const unsigned long end)
@@ -225,7 +224,6 @@ acpi_parse_memory_affinity(struct acpi_s
 
 	return 0;
 }
-#endif
 
 static int __init acpi_parse_srat(struct acpi_table_header *table)
 {
@@ -254,11 +252,9 @@ int __init acpi_numa_init(void)
 	if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
 		acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY,
 				      acpi_parse_processor_affinity, NR_CPUS);
-#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT
 		acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
 				      acpi_parse_memory_affinity,
 				      NR_NODE_MEMBLKS);
-#endif
 	}
 
 	/* SLIT: System Locality Information Table */
include/linux/acpi.h +1 -2
Index: linux-2.6/include/linux/acpi.h
===================================================================
@@ -94,8 +94,7 @@ int acpi_parse_mcfg (struct acpi_table_h
 void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
 
 /* the following four functions are architecture-dependent */
-#if defined(CONFIG_HAVE_ARCH_PARSE_SRAT) && !defined(NR_NODE_MEMBLKS)
-#define NR_NODE_MEMBLKS MAX_NUMNODES
+#ifndef CONFIG_ACPI_NUMA
 #define acpi_numa_slit_init(slit) do {} while (0)
 #define acpi_numa_processor_affinity_init(pa) do {} while (0)
 #define acpi_numa_memory_affinity_init(ma) do {} while (0)
author
#1 lore raw

PATCH 1/1 x86: remove acpi_srat config

use ACPI_NUMA directly

and move srat_32.c to mm/

arch/x86/Kconfig +0 -5
index ebfcf8c..7301dfb 100644
@@ -460,11 +460,6 @@ config MEMTEST
 		memtest=4, mean do 4 test patterns.
 	  If you are unsure how to answer this question, answer Y.
 
-config ACPI_SRAT
-	def_bool y
-	depends on X86_32 && ACPI && NUMA && X86_GENERICARCH
-	select ACPI_NUMA
-
 config X86_SUMMIT_NUMA
 	def_bool y
 	depends on X86_32 && NUMA && X86_GENERICARCH
arch/x86/kernel/Makefile +0 -1
index 70b9d5c..a927af1 100644
@@ -73,7 +73,6 @@ obj-$(CONFIG_X86_SUMMIT_NUMA)	+= summit_32.o
 obj-y				+= vsmp_64.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_MODULES)		+= module_$(BITS).o
-obj-$(CONFIG_ACPI_SRAT) 	+= srat_32.o
 obj-$(CONFIG_IMMEDIATE)		+= immediate.o
 obj-$(CONFIG_EFI) 		+= efi.o efi_$(BITS).o efi_stub_$(BITS).o
 obj-$(CONFIG_DOUBLEFAULT) 	+= doublefault_32.o
arch/x86/kernel/srat_32.c deleted +0 -280

280 lines not on this page · raw message

arch/x86/mm/Makefile +2 -1
index d673c82..f413159 100644
@@ -20,5 +20,6 @@ obj-$(CONFIG_NUMA)		+= discontig_32.o
 else
 obj-$(CONFIG_NUMA)		+= numa_64.o
 obj-$(CONFIG_K8_NUMA)		+= k8topology_64.o
-obj-$(CONFIG_ACPI_NUMA)		+= srat_64.o
 endif
+obj-$(CONFIG_ACPI_NUMA)		+= srat_$(BITS).o
+
arch/x86/mm/srat_32.c new file +280 -0

280 lines not on this page · raw message

include/asm-x86/srat.h +1 -1
index 456fe0b..774c919 100644
@@ -27,7 +27,7 @@
 #ifndef _ASM_SRAT_H_
 #define _ASM_SRAT_H_
 
-#ifdef CONFIG_ACPI_SRAT
+#ifdef CONFIG_ACPI_NUMA
 extern int get_memcfg_from_srat(void);
 #else
 static inline int get_memcfg_from_srat(void)