Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: Fix !CONFIG_SMP kernel build

Commit fb4a96029c8a (arm64: kernel: fix per-cpu offset restore on
resume) uses per_cpu_offset() unconditionally during CPU wakeup,
however, this is only defined for the SMP case.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Dave P Martin <Dave.Martin@arm.com>

+8
+8
arch/arm64/include/asm/percpu.h
··· 16 16 #ifndef __ASM_PERCPU_H 17 17 #define __ASM_PERCPU_H 18 18 19 + #ifdef CONFIG_SMP 20 + 19 21 static inline void set_my_cpu_offset(unsigned long off) 20 22 { 21 23 asm volatile("msr tpidr_el1, %0" :: "r" (off) : "memory"); ··· 37 35 return off; 38 36 } 39 37 #define __my_cpu_offset __my_cpu_offset() 38 + 39 + #else /* !CONFIG_SMP */ 40 + 41 + #define set_my_cpu_offset(x) do { } while (0) 42 + 43 + #endif /* CONFIG_SMP */ 40 44 41 45 #include <asm-generic/percpu.h> 42 46