summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/smp.h
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2020-07-27 17:29:38 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2020-08-08 20:25:04 +0200
commiteaecca9e7710281be7c31d892c9f447eafd7ddd9 (patch)
tree7990ce241ed1099607436ca7d7d2509d2fbd04a3 /arch/arm64/include/asm/smp.h
parentarm64/fixmap: make notes of fixed_addresses more precisely (diff)
downloadlinux-eaecca9e7710281be7c31d892c9f447eafd7ddd9.tar.xz
linux-eaecca9e7710281be7c31d892c9f447eafd7ddd9.zip
arm64: Fix __cpu_logical_map undefined issue
The __cpu_logical_map undefined issue occued when the new tegra194-cpufreq drvier building as a module. ERROR: modpost: "__cpu_logical_map" [drivers/cpufreq/tegra194-cpufreq.ko] undefined! The driver using cpu_logical_map() macro which will expand to __cpu_logical_map, we can't access it in a drvier. Let's turn cpu_logical_map() into a C wrapper and export it to fix the build issue. Also create a function set_cpu_logical_map(cpu, hwid) when assign a value to cpu_logical_map(cpu). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/smp.h')
-rw-r--r--arch/arm64/include/asm/smp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h
index ea268d88b6f7..f362dddd09c4 100644
--- a/arch/arm64/include/asm/smp.h
+++ b/arch/arm64/include/asm/smp.h
@@ -47,7 +47,12 @@ DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number);
* Logical CPU mapping.
*/
extern u64 __cpu_logical_map[NR_CPUS];
-#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
+extern u64 cpu_logical_map(int cpu);
+
+static inline void set_cpu_logical_map(int cpu, u64 hwid)
+{
+ __cpu_logical_map[cpu] = hwid;
+}
struct seq_file;