diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:38:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:38:55 -0400 |
commit | 0671b7674f42ab3a200401ea0e48d6f47d34acae (patch) | |
tree | a35d3347e927dfe621f42ff82289f61f45564393 /arch/x86/kernel | |
parent | 0b2d8d9e562de3ee2476f549549e4fefbb7a4213 (diff) | |
parent | 47f19a0814e80e1d4e5c17d61b70fca85ea09162 (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
percpu: Remove the multi-page alignment facility
x86-32: Allocate irq stacks seperate from percpu area
x86-32, mm: Remove duplicated #include
x86, printk: Get rid of <0> from stack output
x86, kexec: Make sure to stop all CPUs before exiting the kernel
x86/vsmp: Eliminate kconfig dependency warning
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/dumpstack_32.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/dumpstack_64.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/irq_32.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/reboot.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/smp.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 1 |
6 files changed, 19 insertions, 25 deletions
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c index 0f6376ffa2d9..1bc7f75a5bda 100644 --- a/arch/x86/kernel/dumpstack_32.c +++ b/arch/x86/kernel/dumpstack_32.c | |||
@@ -82,11 +82,11 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, | |||
82 | if (kstack_end(stack)) | 82 | if (kstack_end(stack)) |
83 | break; | 83 | break; |
84 | if (i && ((i % STACKSLOTS_PER_LINE) == 0)) | 84 | if (i && ((i % STACKSLOTS_PER_LINE) == 0)) |
85 | printk("\n%s", log_lvl); | 85 | printk(KERN_CONT "\n"); |
86 | printk(" %08lx", *stack++); | 86 | printk(KERN_CONT " %08lx", *stack++); |
87 | touch_nmi_watchdog(); | 87 | touch_nmi_watchdog(); |
88 | } | 88 | } |
89 | printk("\n"); | 89 | printk(KERN_CONT "\n"); |
90 | show_trace_log_lvl(task, regs, sp, bp, log_lvl); | 90 | show_trace_log_lvl(task, regs, sp, bp, log_lvl); |
91 | } | 91 | } |
92 | 92 | ||
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 57a21f11c791..6a340485249a 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -265,20 +265,20 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, | |||
265 | if (stack >= irq_stack && stack <= irq_stack_end) { | 265 | if (stack >= irq_stack && stack <= irq_stack_end) { |
266 | if (stack == irq_stack_end) { | 266 | if (stack == irq_stack_end) { |
267 | stack = (unsigned long *) (irq_stack_end[-1]); | 267 | stack = (unsigned long *) (irq_stack_end[-1]); |
268 | printk(" <EOI> "); | 268 | printk(KERN_CONT " <EOI> "); |
269 | } | 269 | } |
270 | } else { | 270 | } else { |
271 | if (((long) stack & (THREAD_SIZE-1)) == 0) | 271 | if (((long) stack & (THREAD_SIZE-1)) == 0) |
272 | break; | 272 | break; |
273 | } | 273 | } |
274 | if (i && ((i % STACKSLOTS_PER_LINE) == 0)) | 274 | if (i && ((i % STACKSLOTS_PER_LINE) == 0)) |
275 | printk("\n%s", log_lvl); | 275 | printk(KERN_CONT "\n"); |
276 | printk(" %016lx", *stack++); | 276 | printk(KERN_CONT " %016lx", *stack++); |
277 | touch_nmi_watchdog(); | 277 | touch_nmi_watchdog(); |
278 | } | 278 | } |
279 | preempt_enable(); | 279 | preempt_enable(); |
280 | 280 | ||
281 | printk("\n"); | 281 | printk(KERN_CONT "\n"); |
282 | show_trace_log_lvl(task, regs, sp, bp, log_lvl); | 282 | show_trace_log_lvl(task, regs, sp, bp, log_lvl); |
283 | } | 283 | } |
284 | 284 | ||
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 { | |||
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_MULTIPAGE_ALIGNED(union irq_ctx, hardirq_stack, THREAD_SIZE); | ||
64 | static DEFINE_PER_CPU_MULTIPAGE_ALIGNED(union irq_ctx, softirq_stack, THREAD_SIZE); | ||
65 | |||
66 | static void call_on_stack(void *func, void *stack) | 63 | static 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 | ||
153 | void irq_ctx_exit(int cpu) | ||
154 | { | ||
155 | per_cpu(hardirq_ctx, cpu) = NULL; | ||
156 | } | ||
157 | |||
158 | asmlinkage void do_softirq(void) | 150 | asmlinkage void do_softirq(void) |
159 | { | 151 | { |
160 | unsigned long flags; | 152 | unsigned long flags; |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index f7f53dcd3e0a..c495aa8d4815 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -635,7 +635,7 @@ void native_machine_shutdown(void) | |||
635 | /* O.K Now that I'm on the appropriate processor, | 635 | /* O.K Now that I'm on the appropriate processor, |
636 | * stop all of the others. | 636 | * stop all of the others. |
637 | */ | 637 | */ |
638 | smp_send_stop(); | 638 | stop_other_cpus(); |
639 | #endif | 639 | #endif |
640 | 640 | ||
641 | lapic_shutdown(); | 641 | lapic_shutdown(); |
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index d801210945d6..513deac7228d 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -159,10 +159,10 @@ asmlinkage void smp_reboot_interrupt(void) | |||
159 | irq_exit(); | 159 | irq_exit(); |
160 | } | 160 | } |
161 | 161 | ||
162 | static void native_smp_send_stop(void) | 162 | static void native_stop_other_cpus(int wait) |
163 | { | 163 | { |
164 | unsigned long flags; | 164 | unsigned long flags; |
165 | unsigned long wait; | 165 | unsigned long timeout; |
166 | 166 | ||
167 | if (reboot_force) | 167 | if (reboot_force) |
168 | return; | 168 | return; |
@@ -179,9 +179,12 @@ static void native_smp_send_stop(void) | |||
179 | if (num_online_cpus() > 1) { | 179 | if (num_online_cpus() > 1) { |
180 | apic->send_IPI_allbutself(REBOOT_VECTOR); | 180 | apic->send_IPI_allbutself(REBOOT_VECTOR); |
181 | 181 | ||
182 | /* Don't wait longer than a second */ | 182 | /* |
183 | wait = USEC_PER_SEC; | 183 | * Don't wait longer than a second if the caller |
184 | while (num_online_cpus() > 1 && wait--) | 184 | * didn't ask us to wait. |
185 | */ | ||
186 | timeout = USEC_PER_SEC; | ||
187 | while (num_online_cpus() > 1 && (wait || timeout--)) | ||
185 | udelay(1); | 188 | udelay(1); |
186 | } | 189 | } |
187 | 190 | ||
@@ -227,7 +230,7 @@ struct smp_ops smp_ops = { | |||
227 | .smp_prepare_cpus = native_smp_prepare_cpus, | 230 | .smp_prepare_cpus = native_smp_prepare_cpus, |
228 | .smp_cpus_done = native_smp_cpus_done, | 231 | .smp_cpus_done = native_smp_cpus_done, |
229 | 232 | ||
230 | .smp_send_stop = native_smp_send_stop, | 233 | .stop_other_cpus = native_stop_other_cpus, |
231 | .smp_send_reschedule = native_smp_send_reschedule, | 234 | .smp_send_reschedule = native_smp_send_reschedule, |
232 | 235 | ||
233 | .cpu_up = native_cpu_up, | 236 | .cpu_up = native_cpu_up, |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 6c7faecd9e4a..083e99d1b7df 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(); |