asmlinkage void plat_irq_dispatch(void) { unsigned int cause = read_c0_cause(); unsigned int pending; int cpuid = smp_processor_id(); unsigned long flags; pending = cause & read_c0_status() & ST0_IM; #ifdef CONFIG_SMP if(pending & CAUSEF_IP3) { ipr_spinlock(flags); //irq_intc_ctrlmask_affinity(cpuid,1); response_cpu_busy |= 1 << cpuid; ipr_spinunlock(flags); jzsoc_mbox_interrupt(cpuid); ipr_spinlock(flags); response_cpu_busy &= ~(1 << cpuid); //irq_intc_ctrlmask_affinity(cpuid,0); ipr_spinunlock(flags); } #endif if (cause & CAUSEF_IP4) { do_IRQ(IRQ_OST); } if(pending & CAUSEF_IP2) { intc_irq_dispatch(cpuid); } }
asmlinkage void plat_irq_dispatch(void) { unsigned int cause = read_c0_cause(); unsigned int pending = cause & read_c0_status() & ST0_IM; if (cause & CAUSEF_IP4) { do_IRQ(IRQ_OST); } #ifdef CONFIG_SMP if(pending & CAUSEF_IP3) { jzsoc_mbox_interrupt(); } #endif if(pending & CAUSEF_IP2) intc_irq_dispatch(); cause = read_c0_cause(); pending = cause & read_c0_status() & ST0_IM; }