Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91182
b: refs/heads/master
c: 5e69b94
h: refs/heads/master
v: v3
  • Loading branch information
Uwe Kleine-König authored and Uwe Kleine-König committed Mar 31, 2008
1 parent 5e4924a commit 41e4a9b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 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: a287453e37a11a128ee0761e1db2e79d7faacdb3
refs/heads/master: 5e69b945f20aec17bf057acbb61b6682461e7149
40 changes: 39 additions & 1 deletion trunk/arch/arm/mach-ns9xxx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* the Free Software Foundation.
*/
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>
#include <asm/io.h>
#include <asm/mach/irq.h>
#include <asm/mach-types.h>
Expand Down Expand Up @@ -52,6 +53,43 @@ static struct irq_chip ns9xxx_chip = {
.unmask = ns9xxx_unmask_irq,
};

#if 0
#define handle_irq handle_level_irq
#else
void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
{
unsigned int cpu = smp_processor_id();
struct irqaction *action;
irqreturn_t action_ret;

spin_lock(&desc->lock);

if (unlikely(desc->status & IRQ_INPROGRESS))
goto out_unlock;

desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
kstat_cpu(cpu).irqs[irq]++;

action = desc->action;
if (unlikely(!action || (desc->status & IRQ_DISABLED)))
goto out_unlock;

desc->status |= IRQ_INPROGRESS;
spin_unlock(&desc->lock);

action_ret = handle_IRQ_event(irq, action);

spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
if (!(desc->status & IRQ_DISABLED) && desc->chip->ack)
desc->chip->ack(irq);

out_unlock:
spin_unlock(&desc->lock);
}
#define handle_irq handle_prio_irq
#endif

void __init ns9xxx_init_irq(void)
{
int i;
Expand All @@ -69,7 +107,7 @@ void __init ns9xxx_init_irq(void)

for (i = 0; i <= 31; ++i) {
set_irq_chip(i, &ns9xxx_chip);
set_irq_handler(i, handle_level_irq);
set_irq_handler(i, handle_irq);
set_irq_flags(i, IRQF_VALID);
}
}

0 comments on commit 41e4a9b

Please sign in to comment.