@@ -174,14 +174,6 @@ static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)
}
#endif /* CONFIG_ACPI_APEI */
-#ifdef CONFIG_ACPI_NUMA
-int acpi_numa_get_nid(unsigned int cpu);
-void acpi_map_cpus_to_nodes(void);
-#else
-static inline int acpi_numa_get_nid(unsigned int cpu) { return NUMA_NO_NODE; }
-static inline void acpi_map_cpus_to_nodes(void) { }
-#endif /* CONFIG_ACPI_NUMA */
-
#define ACPI_TABLE_UPGRADE_MAX_PHYS MEMBLOCK_ALLOC_ACCESSIBLE
#endif /*_ASM_ACPI_H*/
@@ -52,7 +52,6 @@ obj-$(CONFIG_EFI) += efi.o efi-rt-wrapper.o
obj-$(CONFIG_PCI) += pci.o
obj-$(CONFIG_ARMV8_DEPRECATED) += armv8_deprecated.o
obj-$(CONFIG_ACPI) += acpi.o
-obj-$(CONFIG_ACPI_NUMA) += acpi_numa.o
obj-$(CONFIG_ARM64_ACPI_PARKING_PROTOCOL) += acpi_parking_protocol.o
obj-$(CONFIG_PARAVIRT) += paravirt.o
obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
@@ -4,6 +4,7 @@ obj-$(CONFIG_ACPI_APMT) += apmt.o
obj-$(CONFIG_ACPI_FFH) += ffh.o
obj-$(CONFIG_ACPI_GTDT) += gtdt.o
obj-$(CONFIG_ACPI_IORT) += iort.o
+obj-$(CONFIG_ACPI_NUMA) += acpi_numa.o
obj-$(CONFIG_ACPI_PROCESSOR_IDLE) += cpuidle.o
obj-$(CONFIG_ARM_AMBA) += amba.o
obj-y += dma.o init.o
similarity index 100%
rename from arch/arm64/kernel/acpi_numa.c
rename to drivers/acpi/arm64/acpi_numa.c
@@ -253,8 +253,12 @@ static inline void acpi_arch_dma_setup(struct device *dev) { }
#endif
#ifdef CONFIG_ARM64
+int acpi_numa_get_nid(unsigned int cpu);
+void acpi_map_cpus_to_nodes(void);
void acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa);
#else
+static inline int acpi_numa_get_nid(unsigned int cpu) { return NUMA_NO_NODE; }
+static inline void acpi_map_cpus_to_nodes(void) { }
static inline void
acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) { }
#endif
The ARM64 ACPI NUMA code can be moved out of arm64 arch code as it just related to ACPI NUMA table parsing, mappings for ACPI NUMA and cpu, move the ACPI NUMA code to drivers/acpi/arm64/. Since arm64 selects ACPI_NUMA by default, so just move the function definitions under CONFIG_ARM64 in linux/acpi.h. Signed-off-by: Hanjun Guo <guohanjun@huawei.com> --- arch/arm64/include/asm/acpi.h | 8 -------- arch/arm64/kernel/Makefile | 1 - drivers/acpi/arm64/Makefile | 1 + {arch/arm64/kernel => drivers/acpi/arm64}/acpi_numa.c | 0 include/linux/acpi.h | 4 ++++ 5 files changed, 5 insertions(+), 9 deletions(-) rename {arch/arm64/kernel => drivers/acpi/arm64}/acpi_numa.c (100%)