summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/percpu.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2022-06-05 11:19:53 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2022-06-08 06:00:40 +0300
commit255b4658c809e194bc10236ac24a722ec14a83d6 (patch)
treea325d0ed85a26eaf794369a5c52dc5a53d6a0041 /arch/loongarch/include/asm/percpu.h
parentf2906aa863381afb0015a9eb7fefad885d4e5a56 (diff)
downloadlinux-255b4658c809e194bc10236ac24a722ec14a83d6.tar.xz
LoongArch: Fix the !CONFIG_SMP build
1, We assume arch/loongarch/include/asm/smp.h be included in include/ linux/smp.h is valid and the reverse inclusion isn't. So remove the <linux/smp.h> in arch/loongarch/include/asm/smp.h. 2, arch/loongarch/include/asm/smp.h is only needed when CONFIG_SMP, and setup.c include it only because it need plat_smp_setup(). So, reorganize setup.c & smp.h, and then remove <asm/smp.h> in setup.c. 3, Fix cacheinfo.c and percpu.h build error by adding the missing header files when !CONFIG_SMP. 4, Fix acpi.c build error by adding CONFIG_SMP guards. 5, Move irq_stat definition from smp.c to irq.c and fix its declaration. 6, Select CONFIG_SMP for CONFIG_NUMA, similar as other architectures do. Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/percpu.h')
-rw-r--r--arch/loongarch/include/asm/percpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/percpu.h b/arch/loongarch/include/asm/percpu.h
index 34f15a6fb1e7..e6569f18c6dd 100644
--- a/arch/loongarch/include/asm/percpu.h
+++ b/arch/loongarch/include/asm/percpu.h
@@ -6,6 +6,7 @@
#define __ASM_PERCPU_H
#include <asm/cmpxchg.h>
+#include <asm/loongarch.h>
/* Use r21 for fast access */
register unsigned long __my_cpu_offset __asm__("$r21");