Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243219
b: refs/heads/master
c: 6829310
h: refs/heads/master
i:
  243217: 1a45d73
  243215: 92973ce
v: v3
  • Loading branch information
Thomas Gleixner committed Mar 28, 2011
1 parent 1382d21 commit 21580fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 55 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: f9ba4475f95b135e6f68e74d59bba92fd35ca835
refs/heads/master: 6829310548a76d343205029bb41c14e75bf6a7fb
58 changes: 4 additions & 54 deletions trunk/arch/arm/mach-ns9xxx/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ static void ns9xxx_mask_irq(struct irq_data *d)
__raw_writel(ic, SYS_IC(prio / 4));
}

static void ns9xxx_ack_irq(struct irq_data *d)
static void ns9xxx_eoi_irq(struct irq_data *d)
{
__raw_writel(0, SYS_ISRADDR);
}

static void ns9xxx_maskack_irq(struct irq_data *d)
{
ns9xxx_mask_irq(d);
ns9xxx_ack_irq(d);
}

static void ns9xxx_unmask_irq(struct irq_data *d)
{
/* XXX: better use cpp symbols */
Expand All @@ -52,56 +46,11 @@ static void ns9xxx_unmask_irq(struct irq_data *d)
}

static struct irq_chip ns9xxx_chip = {
.irq_ack = ns9xxx_ack_irq,
.irq_eoi = ns9xxx_eoi_irq,
.irq_mask = ns9xxx_mask_irq,
.irq_mask_ack = ns9xxx_maskack_irq,
.irq_unmask = ns9xxx_unmask_irq,
};

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

raw_spin_lock(&desc->lock);

BUG_ON(desc->status & IRQ_INPROGRESS);

desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
kstat_incr_irqs_this_cpu(irq, desc);

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

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

action_ret = handle_IRQ_event(irq, action);

/* XXX: There is no direct way to access noirqdebug, so check
* unconditionally for spurious irqs...
* Maybe this function should go to kernel/irq/chip.c? */
note_interrupt(irq, desc, action_ret);

raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;

if (desc->status & IRQ_DISABLED)
out_mask:
desc->irq_data.chip->irq_mask(&desc->irq_data);

/* ack unconditionally to unmask lower prio irqs */
desc->irq_data.chip->irq_ack(&desc->irq_data);

raw_spin_unlock(&desc->lock);
}
#define handle_irq handle_prio_irq
#endif

void __init ns9xxx_init_irq(void)
{
int i;
Expand All @@ -119,7 +68,8 @@ void __init ns9xxx_init_irq(void)

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

0 comments on commit 21580fa

Please sign in to comment.