aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2010-10-27 01:43:02 -0400
committerIngo Molnar <mingo@elte.hu>2010-10-27 11:31:42 -0400
commit22d4cd4c4dce6d7b7d9a7e396aa4f87fe7a649b1 (patch)
treee36fc7533bd2802ad24b54f6bf2cf68fa8490786 /arch
parent610470ce804f0326ca63fbcdc5be06b750debeb1 (diff)
x86-32: Allocate irq stacks seperate from percpu area
The percpu allocator cannot handle alignments larger than one page. Allocate the irq stacks seperately, and only keep the pointers as percpu data. Signed-off-by: Brian Gerst <brgerst@gmail.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: tj@kernel.org LKML-Reference: <1288158182-1753-1-git-send-email-brgerst@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/irq.h2
-rw-r--r--arch/x86/kernel/irq_32.c12
-rw-r--r--arch/x86/kernel/smpboot.c1
3 files changed, 2 insertions, 13 deletions
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index 0bf5b0083650..13b0ebaa512f 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -21,10 +21,8 @@ static inline int irq_canonicalize(int irq)
21 21
22#ifdef CONFIG_X86_32 22#ifdef CONFIG_X86_32
23extern void irq_ctx_init(int cpu); 23extern void irq_ctx_init(int cpu);
24extern void irq_ctx_exit(int cpu);
25#else 24#else
26# define irq_ctx_init(cpu) do { } while (0) 25# define irq_ctx_init(cpu) do { } while (0)
27# define irq_ctx_exit(cpu) do { } while (0)
28#endif 26#endif
29 27
30#define __ARCH_HAS_DO_SOFTIRQ 28#define __ARCH_HAS_DO_SOFTIRQ
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index 50fbbe60e507..64668dbf00a4 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -60,9 +60,6 @@ union irq_ctx {
60static DEFINE_PER_CPU(union irq_ctx *, hardirq_ctx); 60static DEFINE_PER_CPU(union irq_ctx *, hardirq_ctx);
61static DEFINE_PER_CPU(union irq_ctx *, softirq_ctx); 61static DEFINE_PER_CPU(union irq_ctx *, softirq_ctx);
62 62
63static DEFINE_PER_CPU_MULTIPAGE_ALIGNED(union irq_ctx, hardirq_stack, THREAD_SIZE);
64static DEFINE_PER_CPU_MULTIPAGE_ALIGNED(union irq_ctx, softirq_stack, THREAD_SIZE);
65
66static void call_on_stack(void *func, void *stack) 63static void call_on_stack(void *func, void *stack)
67{ 64{
68 asm volatile("xchgl %%ebx,%%esp \n" 65 asm volatile("xchgl %%ebx,%%esp \n"
@@ -128,7 +125,7 @@ void __cpuinit irq_ctx_init(int cpu)
128 if (per_cpu(hardirq_ctx, cpu)) 125 if (per_cpu(hardirq_ctx, cpu))
129 return; 126 return;
130 127
131 irqctx = &per_cpu(hardirq_stack, cpu); 128 irqctx = (union irq_ctx *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER);
132 irqctx->tinfo.task = NULL; 129 irqctx->tinfo.task = NULL;
133 irqctx->tinfo.exec_domain = NULL; 130 irqctx->tinfo.exec_domain = NULL;
134 irqctx->tinfo.cpu = cpu; 131 irqctx->tinfo.cpu = cpu;
@@ -137,7 +134,7 @@ void __cpuinit irq_ctx_init(int cpu)
137 134
138 per_cpu(hardirq_ctx, cpu) = irqctx; 135 per_cpu(hardirq_ctx, cpu) = irqctx;
139 136
140 irqctx = &per_cpu(softirq_stack, cpu); 137 irqctx = (union irq_ctx *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER);
141 irqctx->tinfo.task = NULL; 138 irqctx->tinfo.task = NULL;
142 irqctx->tinfo.exec_domain = NULL; 139 irqctx->tinfo.exec_domain = NULL;
143 irqctx->tinfo.cpu = cpu; 140 irqctx->tinfo.cpu = cpu;
@@ -150,11 +147,6 @@ void __cpuinit irq_ctx_init(int cpu)
150 cpu, per_cpu(hardirq_ctx, cpu), per_cpu(softirq_ctx, cpu)); 147 cpu, per_cpu(hardirq_ctx, cpu), per_cpu(softirq_ctx, cpu));
151} 148}
152 149
153void irq_ctx_exit(int cpu)
154{
155 per_cpu(hardirq_ctx, cpu) = NULL;
156}
157
158asmlinkage void do_softirq(void) 150asmlinkage void do_softirq(void)
159{ 151{
160 unsigned long flags; 152 unsigned long flags;
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 6af118511b4a..90baf567bbf7 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1373,7 +1373,6 @@ void play_dead_common(void)
1373{ 1373{
1374 idle_task_exit(); 1374 idle_task_exit();
1375 reset_lazy_tlbstate(); 1375 reset_lazy_tlbstate();
1376 irq_ctx_exit(raw_smp_processor_id());
1377 c1e_remove_cpu(raw_smp_processor_id()); 1376 c1e_remove_cpu(raw_smp_processor_id());
1378 1377
1379 mb(); 1378 mb();