aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/percpu.h2
-rw-r--r--include/asm-s390/percpu.h4
-rw-r--r--include/asm-x86_64/percpu.h6
-rw-r--r--include/linux/percpu.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index 6d45ee5472af..196376262240 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -15,7 +15,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
15 15
16/* var is in discarded region: offset to particular copy we want */ 16/* var is in discarded region: offset to particular copy we want */
17#define per_cpu(var, cpu) (*({ \ 17#define per_cpu(var, cpu) (*({ \
18 extern int simple_indentifier_##var(void); \ 18 extern int simple_identifier_##var(void); \
19 RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]); })) 19 RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]); }))
20#define __get_cpu_var(var) per_cpu(var, smp_processor_id()) 20#define __get_cpu_var(var) per_cpu(var, smp_processor_id())
21#define __raw_get_cpu_var(var) per_cpu(var, raw_smp_processor_id()) 21#define __raw_get_cpu_var(var) per_cpu(var, raw_smp_processor_id())
diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h
index 495ad99c7635..9ea7f1023e57 100644
--- a/include/asm-s390/percpu.h
+++ b/include/asm-s390/percpu.h
@@ -16,7 +16,7 @@
16#if defined(__s390x__) && defined(MODULE) 16#if defined(__s390x__) && defined(MODULE)
17 17
18#define __reloc_hide(var,offset) (*({ \ 18#define __reloc_hide(var,offset) (*({ \
19 extern int simple_indentifier_##var(void); \ 19 extern int simple_identifier_##var(void); \
20 unsigned long *__ptr; \ 20 unsigned long *__ptr; \
21 asm ( "larl %0,per_cpu__"#var"@GOTENT" \ 21 asm ( "larl %0,per_cpu__"#var"@GOTENT" \
22 : "=a" (__ptr) : "X" (per_cpu__##var) ); \ 22 : "=a" (__ptr) : "X" (per_cpu__##var) ); \
@@ -25,7 +25,7 @@
25#else 25#else
26 26
27#define __reloc_hide(var, offset) (*({ \ 27#define __reloc_hide(var, offset) (*({ \
28 extern int simple_indentifier_##var(void); \ 28 extern int simple_identifier_##var(void); \
29 unsigned long __ptr; \ 29 unsigned long __ptr; \
30 asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) ); \ 30 asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) ); \
31 (typeof(&per_cpu__##var)) (__ptr + (offset)); })) 31 (typeof(&per_cpu__##var)) (__ptr + (offset)); }))
diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h
index 285756010c51..5ed0ef340842 100644
--- a/include/asm-x86_64/percpu.h
+++ b/include/asm-x86_64/percpu.h
@@ -32,13 +32,13 @@
32 32
33/* var is in discarded region: offset to particular copy we want */ 33/* var is in discarded region: offset to particular copy we want */
34#define per_cpu(var, cpu) (*({ \ 34#define per_cpu(var, cpu) (*({ \
35 extern int simple_indentifier_##var(void); \ 35 extern int simple_identifier_##var(void); \
36 RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)); })) 36 RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)); }))
37#define __get_cpu_var(var) (*({ \ 37#define __get_cpu_var(var) (*({ \
38 extern int simple_indentifier_##var(void); \ 38 extern int simple_identifier_##var(void); \
39 RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); })) 39 RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); }))
40#define __raw_get_cpu_var(var) (*({ \ 40#define __raw_get_cpu_var(var) (*({ \
41 extern int simple_indentifier_##var(void); \ 41 extern int simple_identifier_##var(void); \
42 RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); })) 42 RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); }))
43 43
44/* A macro to avoid #include hell... */ 44/* A macro to avoid #include hell... */
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 46ec72fa2c84..600e3d387ffc 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -19,7 +19,7 @@
19 * we force a syntax error here if it isn't. 19 * we force a syntax error here if it isn't.
20 */ 20 */
21#define get_cpu_var(var) (*({ \ 21#define get_cpu_var(var) (*({ \
22 extern int simple_indentifier_##var(void); \ 22 extern int simple_identifier_##var(void); \
23 preempt_disable(); \ 23 preempt_disable(); \
24 &__get_cpu_var(var); })) 24 &__get_cpu_var(var); }))
25#define put_cpu_var(var) preempt_enable() 25#define put_cpu_var(var) preempt_enable()