2005-04-16 16:20:36 -06:00
|
|
|
/*
|
|
|
|
* linux/kernel/irq/handle.c
|
|
|
|
*
|
2006-06-29 03:24:50 -06:00
|
|
|
* Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar
|
|
|
|
* Copyright (C) 2005-2006, Thomas Gleixner, Russell King
|
2005-04-16 16:20:36 -06:00
|
|
|
*
|
|
|
|
* This file contains the core interrupt handling code.
|
2006-06-29 03:24:50 -06:00
|
|
|
*
|
|
|
|
* Detailed information is available in Documentation/DocBook/genericirq
|
|
|
|
*
|
2005-04-16 16:20:36 -06:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/irq.h>
|
|
|
|
#include <linux/random.h>
|
2010-09-22 09:09:43 -06:00
|
|
|
#include <linux/sched.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/kernel_stat.h>
|
2010-09-22 09:09:43 -06:00
|
|
|
|
2009-04-14 17:39:12 -06:00
|
|
|
#include <trace/events/irq.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
#include "internals.h"
|
|
|
|
|
2006-06-29 03:24:51 -06:00
|
|
|
/**
|
|
|
|
* handle_bad_irq - handle spurious and unhandled irqs
|
2006-08-31 22:27:44 -06:00
|
|
|
* @irq: the interrupt number
|
|
|
|
* @desc: description of the interrupt
|
|
|
|
*
|
|
|
|
* Handles spurious and unhandled IRQ's. It also prints a debugmessage.
|
2006-06-29 03:24:51 -06:00
|
|
|
*/
|
2008-10-15 07:27:23 -06:00
|
|
|
void handle_bad_irq(unsigned int irq, struct irq_desc *desc)
|
2006-06-29 03:24:51 -06:00
|
|
|
{
|
2006-06-29 03:24:58 -06:00
|
|
|
print_irq_desc(irq, desc);
|
2008-10-15 07:27:23 -06:00
|
|
|
kstat_incr_irqs_this_cpu(irq, desc);
|
2006-06-29 03:24:51 -06:00
|
|
|
ack_bad_irq(irq);
|
|
|
|
}
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
/*
|
|
|
|
* Special, empty irq handler:
|
|
|
|
*/
|
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 07:55:46 -06:00
|
|
|
irqreturn_t no_action(int cpl, void *dev_id)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
return IRQ_NONE;
|
|
|
|
}
|
|
|
|
|
2009-03-24 04:46:22 -06:00
|
|
|
static void warn_no_thread(unsigned int irq, struct irqaction *action)
|
|
|
|
{
|
|
|
|
if (test_and_set_bit(IRQTF_WARNED, &action->thread_flags))
|
|
|
|
return;
|
|
|
|
|
|
|
|
printk(KERN_WARNING "IRQ %d device %s returned IRQ_WAKE_THREAD "
|
|
|
|
"but no thread function available.", irq, action->name);
|
|
|
|
}
|
|
|
|
|
2006-06-29 03:24:46 -06:00
|
|
|
/**
|
|
|
|
* handle_IRQ_event - irq action chain handler
|
|
|
|
* @irq: the interrupt number
|
|
|
|
* @action: the interrupt action chain for this irq
|
|
|
|
*
|
|
|
|
* Handles the action chain of an irq event
|
2005-04-16 16:20:36 -06:00
|
|
|
*/
|
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 07:55:46 -06:00
|
|
|
irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2006-06-23 03:06:00 -06:00
|
|
|
irqreturn_t ret, retval = IRQ_NONE;
|
|
|
|
unsigned int status = 0;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
do {
|
2009-02-26 08:11:05 -07:00
|
|
|
trace_irq_handler_entry(irq, action);
|
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 07:55:46 -06:00
|
|
|
ret = action->handler(irq, action->dev_id);
|
2009-02-26 08:11:05 -07:00
|
|
|
trace_irq_handler_exit(irq, action, ret);
|
2009-03-23 11:28:15 -06:00
|
|
|
|
|
|
|
switch (ret) {
|
|
|
|
case IRQ_WAKE_THREAD:
|
2009-03-24 04:46:22 -06:00
|
|
|
/*
|
|
|
|
* Set result to handled so the spurious check
|
|
|
|
* does not trigger.
|
|
|
|
*/
|
|
|
|
ret = IRQ_HANDLED;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Catch drivers which return WAKE_THREAD but
|
|
|
|
* did not set up a thread function
|
|
|
|
*/
|
|
|
|
if (unlikely(!action->thread_fn)) {
|
|
|
|
warn_no_thread(irq, action);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-03-23 11:28:15 -06:00
|
|
|
/*
|
|
|
|
* Wake up the handler thread for this
|
|
|
|
* action. In case the thread crashed and was
|
|
|
|
* killed we just pretend that we handled the
|
|
|
|
* interrupt. The hardirq handler above has
|
|
|
|
* disabled the device interrupt, so no irq
|
|
|
|
* storm is lurking.
|
|
|
|
*/
|
|
|
|
if (likely(!test_bit(IRQTF_DIED,
|
|
|
|
&action->thread_flags))) {
|
|
|
|
set_bit(IRQTF_RUNTHREAD, &action->thread_flags);
|
|
|
|
wake_up_process(action->thread);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Fall through to add to randomness */
|
|
|
|
case IRQ_HANDLED:
|
2005-04-16 16:20:36 -06:00
|
|
|
status |= action->flags;
|
2009-03-23 11:28:15 -06:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
retval |= ret;
|
|
|
|
action = action->next;
|
|
|
|
} while (action);
|
|
|
|
|
2006-07-01 20:29:31 -06:00
|
|
|
if (status & IRQF_SAMPLE_RANDOM)
|
2005-04-16 16:20:36 -06:00
|
|
|
add_interrupt_randomness(irq);
|
|
|
|
local_irq_disable();
|
|
|
|
|
|
|
|
return retval;
|
|
|
|
}
|
|
|
|
|
2006-09-26 00:32:07 -06:00
|
|
|
#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
|
2009-03-13 07:34:05 -06:00
|
|
|
|
|
|
|
#ifdef CONFIG_ENABLE_WARN_DEPRECATED
|
|
|
|
# warning __do_IRQ is deprecated. Please convert to proper flow handlers
|
|
|
|
#endif
|
|
|
|
|
2006-06-29 03:24:46 -06:00
|
|
|
/**
|
|
|
|
* __do_IRQ - original all in one highlevel IRQ handler
|
|
|
|
* @irq: the interrupt number
|
|
|
|
*
|
|
|
|
* __do_IRQ handles all normal device IRQ's (the special
|
2005-04-16 16:20:36 -06:00
|
|
|
* SMP cross-CPU interrupts have their own specific
|
|
|
|
* handlers).
|
2006-06-29 03:24:46 -06:00
|
|
|
*
|
|
|
|
* This is the original x86 implementation which is used for every
|
|
|
|
* interrupt type.
|
2005-04-16 16:20:36 -06:00
|
|
|
*/
|
2008-02-08 05:19:53 -07:00
|
|
|
unsigned int __do_IRQ(unsigned int irq)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2008-08-19 21:50:05 -06:00
|
|
|
struct irq_desc *desc = irq_to_desc(irq);
|
2006-06-29 03:24:40 -06:00
|
|
|
struct irqaction *action;
|
2005-04-16 16:20:36 -06:00
|
|
|
unsigned int status;
|
|
|
|
|
2008-10-15 07:27:23 -06:00
|
|
|
kstat_incr_irqs_this_cpu(irq, desc);
|
|
|
|
|
2005-09-06 16:17:25 -06:00
|
|
|
if (CHECK_IRQ_PER_CPU(desc->status)) {
|
2005-04-16 16:20:36 -06:00
|
|
|
irqreturn_t action_ret;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* No locking required for CPU-local interrupts:
|
|
|
|
*/
|
2010-10-01 04:58:38 -06:00
|
|
|
if (desc->irq_data.chip->ack)
|
|
|
|
desc->irq_data.chip->ack(irq);
|
2007-11-14 18:00:15 -07:00
|
|
|
if (likely(!(desc->status & IRQ_DISABLED))) {
|
|
|
|
action_ret = handle_IRQ_event(irq, desc->action);
|
|
|
|
if (!noirqdebug)
|
|
|
|
note_interrupt(irq, desc, action_ret);
|
|
|
|
}
|
2010-10-01 04:58:38 -06:00
|
|
|
desc->irq_data.chip->end(irq);
|
2005-04-16 16:20:36 -06:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2009-11-17 08:46:45 -07:00
|
|
|
raw_spin_lock(&desc->lock);
|
2010-10-01 04:58:38 -06:00
|
|
|
if (desc->irq_data.chip->ack)
|
|
|
|
desc->irq_data.chip->ack(irq);
|
2005-04-16 16:20:36 -06:00
|
|
|
/*
|
|
|
|
* REPLAY is when Linux resends an IRQ that was dropped earlier
|
|
|
|
* WAITING is used by probe to mark irqs that are being tested
|
|
|
|
*/
|
|
|
|
status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
|
|
|
|
status |= IRQ_PENDING; /* we _want_ to handle it */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If the IRQ is disabled for whatever reason, we cannot
|
|
|
|
* use the action we have.
|
|
|
|
*/
|
|
|
|
action = NULL;
|
|
|
|
if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
|
|
|
|
action = desc->action;
|
|
|
|
status &= ~IRQ_PENDING; /* we commit to handling */
|
|
|
|
status |= IRQ_INPROGRESS; /* we are handling it */
|
|
|
|
}
|
|
|
|
desc->status = status;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If there is no IRQ handler or it was disabled, exit early.
|
|
|
|
* Since we set PENDING, if another processor is handling
|
|
|
|
* a different instance of this same irq, the other processor
|
|
|
|
* will take care of it.
|
|
|
|
*/
|
|
|
|
if (unlikely(!action))
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Edge triggered interrupts need to remember
|
|
|
|
* pending events.
|
|
|
|
* This applies to any hw interrupts that allow a second
|
|
|
|
* instance of the same irq to arrive while we are in do_IRQ
|
|
|
|
* or in the handler. But the code here only handles the _second_
|
|
|
|
* instance of the irq, not the third or fourth. So it is mostly
|
|
|
|
* useful for irq hardware that does not mask cleanly in an
|
|
|
|
* SMP environment.
|
|
|
|
*/
|
|
|
|
for (;;) {
|
|
|
|
irqreturn_t action_ret;
|
|
|
|
|
2009-11-17 08:46:45 -07:00
|
|
|
raw_spin_unlock(&desc->lock);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 07:55:46 -06:00
|
|
|
action_ret = handle_IRQ_event(irq, action);
|
2005-04-16 16:20:36 -06:00
|
|
|
if (!noirqdebug)
|
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 07:55:46 -06:00
|
|
|
note_interrupt(irq, desc, action_ret);
|
2006-11-22 10:32:06 -07:00
|
|
|
|
2009-11-17 08:46:45 -07:00
|
|
|
raw_spin_lock(&desc->lock);
|
2005-04-16 16:20:36 -06:00
|
|
|
if (likely(!(desc->status & IRQ_PENDING)))
|
|
|
|
break;
|
|
|
|
desc->status &= ~IRQ_PENDING;
|
|
|
|
}
|
|
|
|
desc->status &= ~IRQ_INPROGRESS;
|
|
|
|
|
|
|
|
out:
|
|
|
|
/*
|
|
|
|
* The ->end() handler has to deal with interrupts which got
|
|
|
|
* disabled while the handler was running.
|
|
|
|
*/
|
2010-10-01 04:58:38 -06:00
|
|
|
desc->irq_data.chip->end(irq);
|
2009-11-17 08:46:45 -07:00
|
|
|
raw_spin_unlock(&desc->lock);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
2006-09-26 00:32:07 -06:00
|
|
|
#endif
|