diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h index fc55f5a57a06ef..7949f6090eed61 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h @@ -47,6 +47,8 @@ DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number); */ extern u64 __cpu_logical_map[NR_CPUS]; extern u64 cpu_logical_map(unsigned int cpu); +extern u64 get_acpicpu_numa_node(unsigned int cpu); +extern int set_acpicpu_numa_node(unsigned int cpu, unsigned int node); static inline void set_cpu_logical_map(unsigned int cpu, u64 hwid) { diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index be5f85b0a24de6..68d7a7894e107d 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -284,6 +284,20 @@ static int __init reserve_memblock_reserved_regions(void) } arch_initcall(reserve_memblock_reserved_regions); +u64 __acpicpu_node_map[NR_CPUS] = { [0 ... NR_CPUS-1] = NUMA_NO_NODE }; + +u64 get_acpicpu_numa_node(unsigned int cpu) +{ + return __acpicpu_node_map[cpu]; +} + +int set_acpicpu_numa_node(unsigned int cpu, unsigned int node) +{ + __acpicpu_node_map[cpu] = node; + + return 0; +} + u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID }; u64 cpu_logical_map(unsigned int cpu) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index c7d8bea1d1d61f..6f8fc874eff0e7 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -556,8 +556,10 @@ static int set_numa_node_for_cpu(acpi_handle handle, int cpu) /* will evaluate _PXM */ node_id = acpi_get_node(handle); - if (node_id != NUMA_NO_NODE) + if (node_id != NUMA_NO_NODE) { + set_acpicpu_numa_node(cpu, node_id); set_cpu_numa_node(cpu, node_id); + } #endif return 0; } @@ -565,7 +567,7 @@ static int set_numa_node_for_cpu(acpi_handle handle, int cpu) static void unset_numa_node_for_cpu(int cpu) { #ifdef CONFIG_ACPI_NUMA - set_cpu_numa_node(cpu, NUMA_NO_NODE); + set_acpicpu_numa_node(cpu, NUMA_NO_NODE); #endif }