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.
Unified · Split
| @@ -16,6 +16,8 @@ · 15 unmodified lines | ||
| 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"); |
| @@ -36,6 +38,12 @@ static inline unsigned long __my_cpu_offset(void) · 14 unmodified lines | ||
| 36 | 38 | } |
| 37 | 39 | #define __my_cpu_offset __my_cpu_offset() |
| 38 | 40 | |
| 41 | +#else /* !CONFIG_SMP */ | |
| 42 | + | |
| 43 | +#define set_my_cpu_offset(x) do { } while (0) | |
| 44 | + | |
| 45 | +#endif /* CONFIG_SMP */ | |
| 46 | + | |
| 39 | 47 | #include <asm-generic/percpu.h> |
| 40 | 48 | |
| 41 | 49 | #endif /* __ASM_PERCPU_H */ |