History

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.

Catalin Marinas committed 12 years ago

Commit b57fc9e1 parent 84fe6821 file · +8 −0Browse files

Unified · Split

arch/arm64/include/asm/percpu.h+8−0
@@ -16,6 +16,8 @@ · 15 unmodified lines
16#ifndef __ASM_PERCPU_H16#ifndef __ASM_PERCPU_H
17#define __ASM_PERCPU_H17#define __ASM_PERCPU_H
18 18
19#ifdef CONFIG_SMP
20
19static inline void set_my_cpu_offset(unsigned long off)21static inline void set_my_cpu_offset(unsigned long off)
20{22{
21 asm volatile("msr tpidr_el1, %0" :: "r" (off) : "memory");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#define __my_cpu_offset __my_cpu_offset()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#include <asm-generic/percpu.h>47#include <asm-generic/percpu.h>
40 48
41#endif /* __ASM_PERCPU_H */49#endif /* __ASM_PERCPU_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t