[PATCH 01/11] arch: Export cpu_logical_map to modules

Florian Fainelli f.fainelli at gmail.com
Fri Sep 24 10:05:36 PDT 2021


In order to allow drivers/irqchip/irq-bcm7038-l1.c to be built as a
module and usable in GKI, export cpu_logical_map or __cpu_logical_map
towards the modules.

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 arch/arm/kernel/setup.c   | 1 +
 arch/arm64/kernel/setup.c | 1 +
 arch/sh/kernel/smp.c      | 1 +
 3 files changed, 3 insertions(+)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 284a80c0b6e1..abd5c999bdb2 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -585,6 +585,7 @@ void notrace cpu_init(void)
 }
 
 u32 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = MPIDR_INVALID };
+EXPORT_SYMBOL(__cpu_logical_map);
 
 void __init smp_setup_processor_id(void)
 {
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index be5f85b0a24d..d8f796ae13c4 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -290,6 +290,7 @@ u64 cpu_logical_map(unsigned int cpu)
 {
 	return __cpu_logical_map[cpu];
 }
+EXPORT_SYMBOL(cpu_logical_map);
 
 void __init __no_sanitize_address setup_arch(char **cmdline_p)
 {
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 65924d9ec245..8f16cfaad238 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -30,6 +30,7 @@
 
 int __cpu_number_map[NR_CPUS];		/* Map physical to logical */
 int __cpu_logical_map[NR_CPUS];		/* Map logical to physical */
+EXPORT_SYMBOL(__cpu_logical_map);
 
 struct plat_smp_ops *mp_ops = NULL;
 
-- 
2.25.1




More information about the linux-arm-kernel mailing list