diff options
-rw-r--r-- | arch/x86/kernel/irq_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 2 | ||||
-rw-r--r-- | include/linux/percpu-defs.h | 12 |
3 files changed, 15 insertions, 3 deletions
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 3b5609f54c4b..50fbbe60e507 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -60,8 +60,8 @@ union irq_ctx { | |||
60 | static DEFINE_PER_CPU(union irq_ctx *, hardirq_ctx); | 60 | static DEFINE_PER_CPU(union irq_ctx *, hardirq_ctx); |
61 | static DEFINE_PER_CPU(union irq_ctx *, softirq_ctx); | 61 | static DEFINE_PER_CPU(union irq_ctx *, softirq_ctx); |
62 | 62 | ||
63 | static DEFINE_PER_CPU_PAGE_ALIGNED(union irq_ctx, hardirq_stack); | 63 | static DEFINE_PER_CPU_MULTIPAGE_ALIGNED(union irq_ctx, hardirq_stack, THREAD_SIZE); |
64 | static DEFINE_PER_CPU_PAGE_ALIGNED(union irq_ctx, softirq_stack); | 64 | static DEFINE_PER_CPU_MULTIPAGE_ALIGNED(union irq_ctx, softirq_stack, THREAD_SIZE); |
65 | 65 | ||
66 | static void call_on_stack(void *func, void *stack) | 66 | static void call_on_stack(void *func, void *stack) |
67 | { | 67 | { |
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index d0bb52296fa3..bb899475355d 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -273,7 +273,7 @@ SECTIONS | |||
273 | } | 273 | } |
274 | 274 | ||
275 | #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) | 275 | #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) |
276 | PERCPU(PAGE_SIZE) | 276 | PERCPU(THREAD_SIZE) |
277 | #endif | 277 | #endif |
278 | 278 | ||
279 | . = ALIGN(PAGE_SIZE); | 279 | . = ALIGN(PAGE_SIZE); |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index ce2dc655cd1d..ab20d119a85d 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
@@ -139,6 +139,18 @@ | |||
139 | __aligned(PAGE_SIZE) | 139 | __aligned(PAGE_SIZE) |
140 | 140 | ||
141 | /* | 141 | /* |
142 | * Declaration/definition used for large per-CPU variables that must be | ||
143 | * aligned to something larger than the pagesize. | ||
144 | */ | ||
145 | #define DECLARE_PER_CPU_MULTIPAGE_ALIGNED(type, name, size) \ | ||
146 | DECLARE_PER_CPU_SECTION(type, name, "..page_aligned") \ | ||
147 | __aligned(size) | ||
148 | |||
149 | #define DEFINE_PER_CPU_MULTIPAGE_ALIGNED(type, name, size) \ | ||
150 | DEFINE_PER_CPU_SECTION(type, name, "..page_aligned") \ | ||
151 | __aligned(size) | ||
152 | |||
153 | /* | ||
142 | * Intermodule exports for per-CPU variables. sparse forgets about | 154 | * Intermodule exports for per-CPU variables. sparse forgets about |
143 | * address space across EXPORT_SYMBOL(), change EXPORT_SYMBOL() to | 155 | * address space across EXPORT_SYMBOL(), change EXPORT_SYMBOL() to |
144 | * noop if __CHECKER__. | 156 | * noop if __CHECKER__. |