Commit 5b3a3741 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ralf Baechle

MIPS: RM9000: Convert to new irq_chip functions

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2190/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e059852a
...@@ -19,22 +19,22 @@ ...@@ -19,22 +19,22 @@
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/system.h> #include <asm/system.h>
static inline void unmask_rm9k_irq(unsigned int irq) static inline void unmask_rm9k_irq(struct irq_data *d)
{ {
set_c0_intcontrol(0x1000 << (irq - RM9K_CPU_IRQ_BASE)); set_c0_intcontrol(0x1000 << (d->irq - RM9K_CPU_IRQ_BASE));
} }
static inline void mask_rm9k_irq(unsigned int irq) static inline void mask_rm9k_irq(struct irq_data *d)
{ {
clear_c0_intcontrol(0x1000 << (irq - RM9K_CPU_IRQ_BASE)); clear_c0_intcontrol(0x1000 << (d->irq - RM9K_CPU_IRQ_BASE));
} }
static inline void rm9k_cpu_irq_enable(unsigned int irq) static inline void rm9k_cpu_irq_enable(struct irq_data *d)
{ {
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
unmask_rm9k_irq(irq); unmask_rm9k_irq(d);
local_irq_restore(flags); local_irq_restore(flags);
} }
...@@ -43,50 +43,47 @@ static inline void rm9k_cpu_irq_enable(unsigned int irq) ...@@ -43,50 +43,47 @@ static inline void rm9k_cpu_irq_enable(unsigned int irq)
*/ */
static void local_rm9k_perfcounter_irq_startup(void *args) static void local_rm9k_perfcounter_irq_startup(void *args)
{ {
unsigned int irq = (unsigned int) args; rm9k_cpu_irq_enable(args);
rm9k_cpu_irq_enable(irq);
} }
static unsigned int rm9k_perfcounter_irq_startup(unsigned int irq) static unsigned int rm9k_perfcounter_irq_startup(struct irq_data *d)
{ {
on_each_cpu(local_rm9k_perfcounter_irq_startup, (void *) irq, 1); on_each_cpu(local_rm9k_perfcounter_irq_startup, d, 1);
return 0; return 0;
} }
static void local_rm9k_perfcounter_irq_shutdown(void *args) static void local_rm9k_perfcounter_irq_shutdown(void *args)
{ {
unsigned int irq = (unsigned int) args;
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
mask_rm9k_irq(irq); mask_rm9k_irq(args);
local_irq_restore(flags); local_irq_restore(flags);
} }
static void rm9k_perfcounter_irq_shutdown(unsigned int irq) static void rm9k_perfcounter_irq_shutdown(struct irq_data *d)
{ {
on_each_cpu(local_rm9k_perfcounter_irq_shutdown, (void *) irq, 1); on_each_cpu(local_rm9k_perfcounter_irq_shutdown, d, 1);
} }
static struct irq_chip rm9k_irq_controller = { static struct irq_chip rm9k_irq_controller = {
.name = "RM9000", .name = "RM9000",
.ack = mask_rm9k_irq, .irq_ack = mask_rm9k_irq,
.mask = mask_rm9k_irq, .irq_mask = mask_rm9k_irq,
.mask_ack = mask_rm9k_irq, .irq_mask_ack = mask_rm9k_irq,
.unmask = unmask_rm9k_irq, .irq_unmask = unmask_rm9k_irq,
.eoi = unmask_rm9k_irq .irq_eoi = unmask_rm9k_irq
}; };
static struct irq_chip rm9k_perfcounter_irq = { static struct irq_chip rm9k_perfcounter_irq = {
.name = "RM9000", .name = "RM9000",
.startup = rm9k_perfcounter_irq_startup, .irq_startup = rm9k_perfcounter_irq_startup,
.shutdown = rm9k_perfcounter_irq_shutdown, .irq_shutdown = rm9k_perfcounter_irq_shutdown,
.ack = mask_rm9k_irq, .irq_ack = mask_rm9k_irq,
.mask = mask_rm9k_irq, .irq_mask = mask_rm9k_irq,
.mask_ack = mask_rm9k_irq, .irq_mask_ack = mask_rm9k_irq,
.unmask = unmask_rm9k_irq, .irq_unmask = unmask_rm9k_irq,
}; };
unsigned int rm9000_perfcount_irq; unsigned int rm9000_perfcount_irq;
......
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