diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-05-27 03:33:34 (GMT) |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-05-27 03:33:34 (GMT) |
commit | 6203c45e33f058f4c766b09cb05fdc9ee7d173de (patch) | |
tree | 09b2e865278bb9e5b03e392a9bce809b988cec18 /arch/arm64/include/asm/smp.h | |
parent | 6b81731fc41031be45430a160679c45b22b79580 (diff) | |
parent | 9fa6a588dedcc0c86bafad5511f4b6096d2e7a5c (diff) | |
download | linux-6203c45e33f058f4c766b09cb05fdc9ee7d173de.tar.xz |
Merge branch 'v4.9/topic/PANemulation' into linux-linaro-lsk-v4.9
Diffstat (limited to 'arch/arm64/include/asm/smp.h')
-rw-r--r-- | arch/arm64/include/asm/smp.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h index 0226447..a62db95 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h @@ -29,11 +29,20 @@ #ifndef __ASSEMBLY__ +#include <asm/percpu.h> + #include <linux/threads.h> #include <linux/cpumask.h> #include <linux/thread_info.h> -#define raw_smp_processor_id() (current_thread_info()->cpu) +DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number); + +/* + * We don't use this_cpu_read(cpu_number) as that has implicit writes to + * preempt_count, and associated (compiler) barriers, that we'd like to avoid + * the expense of. If we're preemptible, the value can be stale at use anyway. + */ +#define raw_smp_processor_id() (*this_cpu_ptr(&cpu_number)) struct seq_file; @@ -73,6 +82,7 @@ asmlinkage void secondary_start_kernel(void); */ struct secondary_data { void *stack; + struct task_struct *task; long status; }; |