aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r--arch/arm/kernel/smp.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 57db122a4f62..cdeb727527d3 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -233,20 +233,6 @@ void __ref cpu_die(void)
233} 233}
234#endif /* CONFIG_HOTPLUG_CPU */ 234#endif /* CONFIG_HOTPLUG_CPU */
235 235
236int __cpu_logical_map[NR_CPUS];
237
238void __init smp_setup_processor_id(void)
239{
240 int i;
241 u32 cpu = is_smp() ? read_cpuid_mpidr() & 0xff : 0;
242
243 cpu_logical_map(0) = cpu;
244 for (i = 1; i < NR_CPUS; ++i)
245 cpu_logical_map(i) = i == cpu ? 0 : i;
246
247 printk(KERN_INFO "Booting Linux on physical CPU %d\n", cpu);
248}
249
250/* 236/*
251 * Called by both boot and secondaries to move global data into 237 * Called by both boot and secondaries to move global data into
252 * per-processor storage. 238 * per-processor storage.
@@ -443,9 +429,7 @@ static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
443static void ipi_timer(void) 429static void ipi_timer(void)
444{ 430{
445 struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent); 431 struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
446 irq_enter();
447 evt->event_handler(evt); 432 evt->event_handler(evt);
448 irq_exit();
449} 433}
450 434
451#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST 435#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
@@ -548,7 +532,9 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
548 532
549 switch (ipinr) { 533 switch (ipinr) {
550 case IPI_TIMER: 534 case IPI_TIMER:
535 irq_enter();
551 ipi_timer(); 536 ipi_timer();
537 irq_exit();
552 break; 538 break;
553 539
554 case IPI_RESCHEDULE: 540 case IPI_RESCHEDULE:
@@ -556,15 +542,21 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
556 break; 542 break;
557 543
558 case IPI_CALL_FUNC: 544 case IPI_CALL_FUNC:
545 irq_enter();
559 generic_smp_call_function_interrupt(); 546 generic_smp_call_function_interrupt();
547 irq_exit();
560 break; 548 break;
561 549
562 case IPI_CALL_FUNC_SINGLE: 550 case IPI_CALL_FUNC_SINGLE:
551 irq_enter();
563 generic_smp_call_function_single_interrupt(); 552 generic_smp_call_function_single_interrupt();
553 irq_exit();
564 break; 554 break;
565 555
566 case IPI_CPU_STOP: 556 case IPI_CPU_STOP:
557 irq_enter();
567 ipi_cpu_stop(cpu); 558 ipi_cpu_stop(cpu);
559 irq_exit();
568 break; 560 break;
569 561
570 default: 562 default: