Exemplo n.º 1
0
/*! @brief the interrupt exception service function.
 *	@details The \cplat_irq_dispatch() function is the interrupt exception
 *	service function called. When an exception is set and the exception
 *	code indicates an interrupt (0x00).
 */
asmlinkage void plat_irq_dispatch(
	struct pt_regs			*regs	/*!< registers of the interrupted task */
)
{
	/* Get the current pending interrupt status */
	unsigned long	pending = read_c0_cause() & read_c0_status();

	/*!	@note Clear all pending interrupts before dispatching. The
		interrupt information structure will call the "end" function
		from the do_IRQ function that should re-enable the specific
		interrupt while completing the interrupt handling (see
		irq_chip structure). */
	/* Disable all MIPS active pending interrupts */
	clear_c0_status(pending);
	/* These are the interrupts that are to be dispatched */
	if( pending & (STATUSF_IP7|STATUSF_IP2) ) {
		/* Dispatch timer interrupt (HW INT#5/IP7)  */
		if (pending & STATUSF_IP7)
			brcm_mips_int7_dispatch(regs);
		/* Dispatch shared interrupt (HW INT#0/IP2)  */
		if (pending & STATUSF_IP2)
			brcm_mips_int2_dispatch(regs);
		/* Return following the successful interrupt exception handling */
		return;
	}
	/* Other interrupts are unhandled and treated as spurious interrupts */
	spurious_interrupt(regs);
}
Exemplo n.º 2
0
asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
{
        unsigned int pending = read_c0_cause() & read_c0_status();

        if (pending & STATUSF_IP7)
                brcm_mips_int7_dispatch(regs);
        else if (pending & STATUSF_IP2)
                brcm_mips_int2_dispatch(regs);
        else
                spurious_interrupt(regs);

}
Exemplo n.º 3
0
asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
{
	unsigned int pend = ((read_c0_cause() & read_c0_status()) >> 8) & 0xff;
	unsigned int shift;

	while ((shift = ffs(pend)) != 0) {
		shift--;
		pend ^= 1 << shift;
		if (shift == 2)
			brcm_mips_int2_dispatch(regs);
#ifdef CONFIG_SMP
		else if (unlikely(shift == 3))
			brcm_mips_int3_dispatch(regs);
#endif
		else
			do_IRQ(MIPS_CPU_IRQ_BASE + shift);
	}
}
Exemplo n.º 4
0
asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
{
	unsigned int pending = read_c0_cause() & read_c0_status();

	if (pending & STATUSF_IP7)
		brcm_mips_int7_dispatch(regs);
	else if (pending & STATUSF_IP2)
		brcm_mips_int2_dispatch(regs);
#ifdef CONFIG_SMP
	else if (pending & STATUSF_IP3)
		brcm_mips_int3_dispatch(regs);
	else if (pending & STATUSF_IP0)
		brcm_mips_int0_dispatch(regs);
	else if (pending & STATUSF_IP1)
		brcm_mips_int1_dispatch(regs);
#endif
	else
		spurious_interrupt(regs);

}
Exemplo n.º 5
0
asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
{
       unsigned int pending = read_c0_cause();
#if ! defined(CONFIG_MIPS_MT)
       /* SMTC clears the status bit in genex.S */
       pending &= read_c0_status();
#endif

       if (pending & STATUSF_IP7)
               brcm_mips_int7_dispatch(regs);
       else if (pending & STATUSF_IP2)
               brcm_mips_int2_dispatch(regs);
#if defined(CONFIG_SMP) && ! defined(CONFIG_MIPS_MT)
       else if (pending & STATUSF_IP0)
               brcm_mips_int0_dispatch(regs);
       else if (pending & STATUSF_IP1)
               brcm_mips_int1_dispatch(regs);
#endif
       else
               spurious_interrupt(regs);
}