Commit 7182297e authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Chen Liqin

score: Convert irq_chip to new functions

Use the proper accessor functions in show_interrupts() while at it.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarChen Liqin <liqin.chen@sunplusct.com>
parent 16c29daf
...@@ -52,9 +52,9 @@ asmlinkage void do_IRQ(int irq) ...@@ -52,9 +52,9 @@ asmlinkage void do_IRQ(int irq)
irq_exit(); irq_exit();
} }
static void score_mask(unsigned int irq_nr) static void score_mask(struct irq_data *d)
{ {
unsigned int irq_source = 63 - irq_nr; unsigned int irq_source = 63 - d->irq;
if (irq_source < 32) if (irq_source < 32)
__raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) | \ __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) | \
...@@ -64,9 +64,9 @@ static void score_mask(unsigned int irq_nr) ...@@ -64,9 +64,9 @@ static void score_mask(unsigned int irq_nr)
(1 << (irq_source - 32))), SCORE_PIC + INT_MASKH); (1 << (irq_source - 32))), SCORE_PIC + INT_MASKH);
} }
static void score_unmask(unsigned int irq_nr) static void score_unmask(struct irq_data *d)
{ {
unsigned int irq_source = 63 - irq_nr; unsigned int irq_source = 63 - d->irq;
if (irq_source < 32) if (irq_source < 32)
__raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) & \ __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) & \
...@@ -78,9 +78,9 @@ static void score_unmask(unsigned int irq_nr) ...@@ -78,9 +78,9 @@ static void score_unmask(unsigned int irq_nr)
struct irq_chip score_irq_chip = { struct irq_chip score_irq_chip = {
.name = "Score7-level", .name = "Score7-level",
.mask = score_mask, .irq_mask = score_mask,
.mask_ack = score_mask, .irq_mask_ack = score_mask,
.unmask = score_unmask, .irq_unmask = score_unmask,
}; };
/* /*
...@@ -127,21 +127,23 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -127,21 +127,23 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); struct irq_desc *desc = irq_to_desc(i);
action = irq_desc[i].action;
raw_spin_lock_irqsave(&desc->lock, flags);
action = desc->action;
if (!action) if (!action)
goto unlock; goto unlock;
seq_printf(p, "%3d: ", i); seq_printf(p, "%3d: ", i);
seq_printf(p, "%10u ", kstat_irqs(i)); seq_printf(p, "%10u ", kstat_irqs(i));
seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-"); seq_printf(p, " %8s", get_irq_desc_chip(desc)->name ? : "-");
seq_printf(p, " %s", action->name); seq_printf(p, " %s", action->name);
for (action = action->next; action; action = action->next) for (action = action->next; action; action = action->next)
seq_printf(p, ", %s", action->name); seq_printf(p, ", %s", action->name);
seq_putc(p, '\n'); seq_putc(p, '\n');
unlock: unlock:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment