/*
 * do_IRQ handles all hardware IRQ's.  Decoded IRQs should not
 * come via this function.  Instead, they should provide their
 * own 'handler'
 */
asmlinkage void __exception_irq_entry
asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
{
	struct pt_regs *old_regs = set_irq_regs(regs);

	irq_enter();

	/*
	 * Some hardware gives randomly wrong interrupts.  Rather
	 * than crashing, do something sensible.
	 */
	if (unlikely(irq >= nr_irqs)) {
		if (printk_ratelimit())
			printk(KERN_WARNING "Bad IRQ%u\n", irq);
		ack_bad_irq(irq);
	} else {
		generic_handle_irq(irq);
	}

	/* AT91 specific workaround */
	irq_finish(irq);

	irq_exit();
	set_irq_regs(old_regs);
}
Esempio n. 2
0
/*
 * handle_IRQ handles all hardware IRQ's.  Decoded IRQs should
 * not come via this function.  Instead, they should provide their
 * own 'handler'.  Used by platform code implementing C-based 1st
 * level decoding.
 */
void handle_IRQ(unsigned int irq, struct pt_regs *regs)
{
	struct pt_regs *old_regs = set_irq_regs(regs);

#ifdef CONFIG_SEC_DEBUG
	int cpu = smp_processor_id();
	unsigned long long start_time = cpu_clock(cpu);
#endif

	perf_mon_interrupt_in();
	irq_enter();

	/*
	 * Some hardware gives randomly wrong interrupts.  Rather
	 * than crashing, do something sensible.
	 */
	if (unlikely(irq >= nr_irqs)) {
		if (printk_ratelimit())
			printk(KERN_WARNING "Bad IRQ%u\n", irq);
		ack_bad_irq(irq);
	} else {
		generic_handle_irq(irq);
	}

	/* AT91 specific workaround */
	irq_finish(irq);

	irq_exit();
#ifdef CONFIG_SEC_DEBUG
	sec_debug_irq_enterexit_log(irq, start_time);
#endif

	set_irq_regs(old_regs);
	perf_mon_interrupt_out();
}
void nk_do_IRQ(unsigned int irq, struct pt_regs *regs)
{
	generic_handle_irq(irq);

	/* AT91 specific workaround */
	irq_finish(irq);
}
Esempio n. 4
0
/*
 * do_IRQ handles all hardware IRQ's.  Decoded IRQs should not
 * come via this function.  Instead, they should provide their
 * own 'handler'
 */
asmlinkage void __exception_irq_entry
asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
{
	struct pt_regs *old_regs = set_irq_regs(regs);

	irq_enter();

	DEBUG_LED_IRQ_ENTER(smp_processor_id(), irq);
#ifdef CONFIG_K3V2_RAMDUMP
	mark_cpu_irq(smp_processor_id(), irq);
#endif /* CONFIG_K3V2_RAMDUMP */
	/*
	 * Some hardware gives randomly wrong interrupts.  Rather
	 * than crashing, do something sensible.
	 */
	if (unlikely(irq >= nr_irqs)) {
		if (printk_ratelimit())
			printk(KERN_WARNING "Bad IRQ%u\n", irq);
		ack_bad_irq(irq);
	} else {
		generic_handle_irq(irq);
	}
#ifdef CONFIG_K3V2_RAMDUMP
	clear_cpu_irq(smp_processor_id());
#endif /* CONFIG_K3V2_RAMDUMP */
	DEBUG_LED_IRQ_EXIT(smp_processor_id(), irq);

	/* AT91 specific workaround */
	irq_finish(irq);

	irq_exit();
	set_irq_regs(old_regs);
}
Esempio n. 5
0
/*
 * handle_IRQ handles all hardware IRQ's.  Decoded IRQs should
 * not come via this function.  Instead, they should provide their
 * own 'handler'.  Used by platform code implementing C-based 1st
 * level decoding.
 */
void handle_IRQ(unsigned int irq, struct pt_regs *regs)
{
	struct pt_regs *old_regs = set_irq_regs(regs);

    unsigned int ulOldIntNum = g_ulIntNumCurrent;

	g_ulIntNumCurrent = irq;

	/*exc int hook func*/
	if( NULL != g_pIntSwitchHook)
	{
	    (g_pIntSwitchHook)(0, ulOldIntNum, irq);
	    g_ulIntFlag = 1;
	}

	irq_enter();

	/*
	 * Some hardware gives randomly wrong interrupts.  Rather
	 * than crashing, do something sensible.
	 */
	if (unlikely(irq >= nr_irqs)) {
		if (printk_ratelimit())
			printk(KERN_WARNING "Bad IRQ%u\n", irq);
		ack_bad_irq(irq);
	} else {
		generic_handle_irq(irq);
	}

	/* AT91 specific workaround */
	irq_finish(irq);

	irq_exit();

    /*exc int hook func*/
	if( (NULL != g_pIntSwitchHook) && (0 != g_ulIntFlag) )
	{
	    (g_pIntSwitchHook)(1, ulOldIntNum, irq);
	}

	set_irq_regs(old_regs);
}
Esempio n. 6
0
void handle_IRQ(unsigned int irq, struct pt_regs *regs)
{
    struct pt_regs *old_regs = set_irq_regs(regs);

    perf_mon_interrupt_in();
    irq_enter();

    if (unlikely(irq >= nr_irqs)) {
        if (printk_ratelimit())
            printk(KERN_WARNING "Bad IRQ%u\n", irq);
        ack_bad_irq(irq);
    } else {
        generic_handle_irq(irq);
    }


    irq_finish(irq);

    irq_exit();
    set_irq_regs(old_regs);
    perf_mon_interrupt_out();
}
Esempio n. 7
0
/*
 * handle_IRQ handles all hardware IRQ's.  Decoded IRQs should
 * not come via this function.  Instead, they should provide their
 * own 'handler'.  Used by platform code implementing C-based 1st
 * level decoding.
 */
void handle_IRQ(unsigned int irq, struct pt_regs *regs)
{
	struct pt_regs *old_regs = set_irq_regs(regs);

	/*
	 * Disable interrupt in oops progress to avoid
	 * panic over panic in ISR.
	 */
	if (oops_in_progress && !smp_processor_id()) {
		set_irq_regs(old_regs);
		local_irq_disable();
		printk(KERN_ERR "In oops,"
			" interrupt is disabled on IRQ%u\n", irq);
		return;
	}

	perf_mon_interrupt_in();
	irq_enter();

	/*
	 * Some hardware gives randomly wrong interrupts.  Rather
	 * than crashing, do something sensible.
	 */
	if (unlikely(irq >= nr_irqs)) {
		if (printk_ratelimit())
			printk(KERN_WARNING "Bad IRQ%u\n", irq);
		ack_bad_irq(irq);
	} else {
		generic_handle_irq(irq);
	}

	/* AT91 specific workaround */
	irq_finish(irq);

	irq_exit();
	set_irq_regs(old_regs);
	perf_mon_interrupt_out();
}
Esempio n. 8
0
/*
 * do_IRQ handles all hardware IRQ's.  Decoded IRQs should not
 * come via this function.  Instead, they should provide their
 * own 'handler'
 */
asmlinkage void __exception_irq_entry
asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
{
	struct pt_regs *old_regs = set_irq_regs(regs);
#ifdef CONFIG_BCM_KNLLOG_IRQ
	struct irq_desc *desc;
#endif

	irq_enter();

	/*
	 * Some hardware gives randomly wrong interrupts.  Rather
	 * than crashing, do something sensible.
	 */
	if (unlikely(irq >= nr_irqs)) {
		if (printk_ratelimit())
			printk(KERN_WARNING "Bad IRQ%u\n", irq);
		ack_bad_irq(irq);
	} else {
#ifdef CONFIG_BCM_KNLLOG_IRQ
		desc = irq_desc + irq;
		if (gKnllogIrqSchedEnable & KNLLOG_IRQ)
			KNLLOG("in  [%d] (0x%x)\n", irq, (int)desc);
#endif
		generic_handle_irq(irq);
	}

#ifdef CONFIG_BCM_KNLLOG_IRQ
	if (gKnllogIrqSchedEnable & KNLLOG_IRQ)
		KNLLOG("out [%d] (0x%x)\n", irq, (int)desc);
#endif

	/* AT91 specific workaround */
	irq_finish(irq);

	irq_exit();
	set_irq_regs(old_regs);
}