diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-02-11 14:52:22 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-02-11 14:52:22 -0500 |
commit | 9049a11de73d3ecc623f1903100d099f82ede56c (patch) | |
tree | c03d130d58168e337a66fe999682452b7a02b42b /include/linux/percpu.h | |
parent | c47c1b1f3a9d6973108020df1dcab7604f7774dd (diff) | |
parent | e4d0407185cdbdcfd99fc23bde2e5454bbc46329 (diff) |
Merge commit 'remotes/tip/x86/paravirt' into x86/untangle2
* commit 'remotes/tip/x86/paravirt': (175 commits)
xen: use direct ops on 64-bit
xen: make direct versions of irq_enable/disable/save/restore to common code
xen: setup percpu data pointers
xen: fix 32-bit build resulting from mmu move
x86/paravirt: return full 64-bit result
x86, percpu: fix kexec with vmlinux
x86/vmi: fix interrupt enable/disable/save/restore calling convention.
x86/paravirt: don't restore second return reg
xen: setup percpu data pointers
x86: split loading percpu segments from loading gdt
x86: pass in cpu number to switch_to_new_gdt()
x86: UV fix uv_flush_send_and_wait()
x86/paravirt: fix missing callee-save call on pud_val
x86/paravirt: use callee-saved convention for pte_val/make_pte/etc
x86/paravirt: implement PVOP_CALL macros for callee-save functions
x86/paravirt: add register-saving thunks to reduce caller register pressure
x86/paravirt: selectively save/restore regs around pvops calls
x86: fix paravirt clobber in entry_64.S
x86/pvops: add a paravirt_ident functions to allow special patching
xen: move remaining mmu-related stuff into mmu.c
...
Conflicts:
arch/x86/mach-voyager/voyager_smp.c
arch/x86/mm/fault.c
Diffstat (limited to 'include/linux/percpu.h')
-rw-r--r-- | include/linux/percpu.h | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 9f2a3751873a..0e24202b5a4e 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -9,34 +9,39 @@ | |||
9 | #include <asm/percpu.h> | 9 | #include <asm/percpu.h> |
10 | 10 | ||
11 | #ifdef CONFIG_SMP | 11 | #ifdef CONFIG_SMP |
12 | #define DEFINE_PER_CPU(type, name) \ | 12 | #define PER_CPU_BASE_SECTION ".data.percpu" |
13 | __attribute__((__section__(".data.percpu"))) \ | ||
14 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | ||
15 | 13 | ||
16 | #ifdef MODULE | 14 | #ifdef MODULE |
17 | #define SHARED_ALIGNED_SECTION ".data.percpu" | 15 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
18 | #else | 16 | #else |
19 | #define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned" | 17 | #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" |
20 | #endif | 18 | #endif |
19 | #define PER_CPU_FIRST_SECTION ".first" | ||
21 | 20 | ||
22 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | 21 | #else |
23 | __attribute__((__section__(SHARED_ALIGNED_SECTION))) \ | 22 | |
24 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ | 23 | #define PER_CPU_BASE_SECTION ".data" |
25 | ____cacheline_aligned_in_smp | 24 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
25 | #define PER_CPU_FIRST_SECTION "" | ||
26 | |||
27 | #endif | ||
26 | 28 | ||
27 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | 29 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ |
28 | __attribute__((__section__(".data.percpu.page_aligned"))) \ | 30 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ |
29 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 31 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name |
30 | #else | 32 | |
31 | #define DEFINE_PER_CPU(type, name) \ | 33 | #define DEFINE_PER_CPU(type, name) \ |
32 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 34 | DEFINE_PER_CPU_SECTION(type, name, "") |
33 | 35 | ||
34 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | 36 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ |
35 | DEFINE_PER_CPU(type, name) | 37 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \ |
38 | ____cacheline_aligned_in_smp | ||
36 | 39 | ||
37 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ | 40 | #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ |
38 | DEFINE_PER_CPU(type, name) | 41 | DEFINE_PER_CPU_SECTION(type, name, ".page_aligned") |
39 | #endif | 42 | |
43 | #define DEFINE_PER_CPU_FIRST(type, name) \ | ||
44 | DEFINE_PER_CPU_SECTION(type, name, PER_CPU_FIRST_SECTION) | ||
40 | 45 | ||
41 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | 46 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) |
42 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | 47 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) |