diff options
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/percpu.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h index 88db872ce2f8..caf8750792ff 100644 --- a/include/asm-sparc64/percpu.h +++ b/include/asm-sparc64/percpu.h | |||
@@ -18,6 +18,11 @@ extern unsigned long __per_cpu_shift; | |||
18 | #define DEFINE_PER_CPU(type, name) \ | 18 | #define DEFINE_PER_CPU(type, name) \ |
19 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name | 19 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name |
20 | 20 | ||
21 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
22 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
23 | __typeof__(type) per_cpu__##name \ | ||
24 | ____cacheline_aligned_in_smp | ||
25 | |||
21 | register unsigned long __local_per_cpu_offset asm("g5"); | 26 | register unsigned long __local_per_cpu_offset asm("g5"); |
22 | 27 | ||
23 | /* var is in discarded region: offset to particular copy we want */ | 28 | /* var is in discarded region: offset to particular copy we want */ |
@@ -38,6 +43,8 @@ do { \ | |||
38 | #define real_setup_per_cpu_areas() do { } while (0) | 43 | #define real_setup_per_cpu_areas() do { } while (0) |
39 | #define DEFINE_PER_CPU(type, name) \ | 44 | #define DEFINE_PER_CPU(type, name) \ |
40 | __typeof__(type) per_cpu__##name | 45 | __typeof__(type) per_cpu__##name |
46 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
47 | DEFINE_PER_CPU(type, name) | ||
41 | 48 | ||
42 | #define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) | 49 | #define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) |
43 | #define __get_cpu_var(var) per_cpu__##var | 50 | #define __get_cpu_var(var) per_cpu__##var |