Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234730
b: refs/heads/master
c: 3d67bae
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Feb 19, 2011
1 parent 236aa27 commit 08a22c4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 009b4c3b8ad584b3462734127a5bec680d5d6af4
refs/heads/master: 3d67baec7f1b01fc289ac1a2f1a7e6d5e43391c6
1 change: 0 additions & 1 deletion trunk/include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/
#define IRQ_SUSPENDED 0x04000000 /* IRQ has gone through suspend sequence */
#define IRQ_ONESHOT 0x08000000 /* IRQ is not unmasked after hardirq */
#define IRQ_NESTED_THREAD 0x10000000 /* IRQ is nested into another, no own handler thread */

#define IRQF_MODIFY_MASK \
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/irq/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)

handle_irq_event(desc);

if (!(desc->status & (IRQ_DISABLED | IRQ_ONESHOT)))
if (!(desc->status & IRQ_DISABLED) && !(desc->istate & IRQS_ONESHOT))
unmask_irq(desc);
out_unlock:
raw_spin_unlock(&desc->lock);
Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/irq/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ enum {
* detection
* IRQS_POLL_INPROGRESS - polling in progress
* IRQS_INPROGRESS - Interrupt in progress
* IRQS_ONESHOT - irq is not unmasked in primary handler
*/
enum {
IRQS_AUTODETECT = 0x00000001,
IRQS_SPURIOUS_DISABLED = 0x00000002,
IRQS_POLL_INPROGRESS = 0x00000008,
IRQS_INPROGRESS = 0x00000010,
IRQS_ONESHOT = 0x00000020,
};

#define irq_data_to_desc(data) container_of(data, struct irq_desc, irq_data)
Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ static int irq_thread(void *data)
};
struct irqaction *action = data;
struct irq_desc *desc = irq_to_desc(action->irq);
int wake, oneshot = desc->status & IRQ_ONESHOT;
int wake, oneshot = desc->istate & IRQS_ONESHOT;

sched_setscheduler(current, SCHED_FIFO, &param);
current->irqaction = action;
Expand Down Expand Up @@ -897,12 +897,12 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
desc->status |= IRQ_PER_CPU;
#endif

desc->status &= ~(IRQ_WAITING | IRQ_ONESHOT);
desc->status &= ~IRQ_WAITING;
desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \
IRQS_INPROGRESS);
IRQS_INPROGRESS | IRQS_ONESHOT);

if (new->flags & IRQF_ONESHOT)
desc->status |= IRQ_ONESHOT;
desc->istate |= IRQS_ONESHOT;

if (!(desc->status & IRQ_NOAUTOEN))
irq_startup(desc);
Expand Down

0 comments on commit 08a22c4

Please sign in to comment.