diff options
Diffstat (limited to 'include/asm-x86/percpu_64.h')
-rw-r--r-- | include/asm-x86/percpu_64.h | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/include/asm-x86/percpu_64.h b/include/asm-x86/percpu_64.h index 24fe7075248d..e7f3f6d21759 100644 --- a/include/asm-x86/percpu_64.h +++ b/include/asm-x86/percpu_64.h | |||
@@ -12,21 +12,10 @@ | |||
12 | #include <asm/pda.h> | 12 | #include <asm/pda.h> |
13 | 13 | ||
14 | #define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset) | 14 | #define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset) |
15 | #define __my_cpu_offset() read_pda(data_offset) | 15 | #define __my_cpu_offset read_pda(data_offset) |
16 | 16 | ||
17 | #define per_cpu_offset(x) (__per_cpu_offset(x)) | 17 | #define per_cpu_offset(x) (__per_cpu_offset(x)) |
18 | 18 | ||
19 | /* var is in discarded region: offset to particular copy we want */ | ||
20 | #define per_cpu(var, cpu) (*({ \ | ||
21 | extern int simple_identifier_##var(void); \ | ||
22 | RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)); })) | ||
23 | #define __get_cpu_var(var) (*({ \ | ||
24 | extern int simple_identifier_##var(void); \ | ||
25 | RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); })) | ||
26 | #define __raw_get_cpu_var(var) (*({ \ | ||
27 | extern int simple_identifier_##var(void); \ | ||
28 | RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()); })) | ||
29 | |||
30 | /* A macro to avoid #include hell... */ | 19 | /* A macro to avoid #include hell... */ |
31 | #define percpu_modcopy(pcpudst, src, size) \ | 20 | #define percpu_modcopy(pcpudst, src, size) \ |
32 | do { \ | 21 | do { \ |
@@ -36,16 +25,8 @@ do { \ | |||
36 | (src), (size)); \ | 25 | (src), (size)); \ |
37 | } while (0) | 26 | } while (0) |
38 | 27 | ||
39 | extern void setup_per_cpu_areas(void); | ||
40 | |||
41 | #else /* ! SMP */ | ||
42 | |||
43 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) | ||
44 | #define __get_cpu_var(var) per_cpu__##var | ||
45 | #define __raw_get_cpu_var(var) per_cpu__##var | ||
46 | |||
47 | #endif /* SMP */ | 28 | #endif /* SMP */ |
48 | 29 | ||
49 | #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name | 30 | #include <asm-generic/percpu.h> |
50 | 31 | ||
51 | #endif /* _ASM_X8664_PERCPU_H_ */ | 32 | #endif /* _ASM_X8664_PERCPU_H_ */ |