summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/smp.h
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-05-27 03:33:34 (GMT)
committerAlex Shi <alex.shi@linaro.org>2017-05-27 03:33:34 (GMT)
commit6203c45e33f058f4c766b09cb05fdc9ee7d173de (patch)
tree09b2e865278bb9e5b03e392a9bce809b988cec18 /arch/arm64/include/asm/smp.h
parent6b81731fc41031be45430a160679c45b22b79580 (diff)
parent9fa6a588dedcc0c86bafad5511f4b6096d2e7a5c (diff)
downloadlinux-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.h12
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;
};