Blackfin arch: fix bug - kgdb fails to continue after setting breakpoint on bf561...
[safe/jmp/linux-2.6] / arch / blackfin / mach-common / smp.c
index 7aeeced..93eab61 100644 (file)
@@ -158,10 +158,14 @@ static irqreturn_t ipi_handler(int irq, void *dev_instance)
                        kfree(msg);
                        break;
                case BFIN_IPI_CALL_FUNC:
+                       spin_unlock(&msg_queue->lock);
                        ipi_call_function(cpu, msg);
+                       spin_lock(&msg_queue->lock);
                        break;
                case BFIN_IPI_CPU_STOP:
+                       spin_unlock(&msg_queue->lock);
                        ipi_cpu_stop(cpu);
+                       spin_lock(&msg_queue->lock);
                        kfree(msg);
                        break;
                default:
@@ -348,7 +352,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
 
 static void __cpuinit setup_secondary(unsigned int cpu)
 {
-#ifndef CONFIG_TICK_SOURCE_SYSTMR0
+#if !(defined(CONFIG_TICK_SOURCE_SYSTMR0) || defined(CONFIG_IPIPE))
        struct irq_desc *timer_desc;
 #endif
        unsigned long ilat;
@@ -365,11 +369,11 @@ static void __cpuinit setup_secondary(unsigned int cpu)
 
        /* Enable interrupt levels IVG7-15. IARs have been already
         * programmed by the boot CPU.  */
-       irq_flags |= IMASK_IVG15 |
+       bfin_irq_flags |= IMASK_IVG15 |
            IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 |
            IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW;
 
-#ifdef CONFIG_TICK_SOURCE_SYSTMR0
+#if defined(CONFIG_TICK_SOURCE_SYSTMR0) || defined(CONFIG_IPIPE)
        /* Power down the core timer, just to play safe. */
        bfin_write_TCNTL(0);
 
@@ -457,7 +461,7 @@ void smp_icache_flush_range_others(unsigned long start, unsigned long end)
        smp_flush_data.start = start;
        smp_flush_data.end = end;
 
-       if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 1))
+       if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 0))
                printk(KERN_WARNING "SMP: failed to run I-cache flush request on other CPUs\n");
 }
 EXPORT_SYMBOL_GPL(smp_icache_flush_range_others);