Commit a93951c4 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ralf Baechle

MIPS: irq_cpu: 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/2191/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 5b3a3741
...@@ -37,42 +37,38 @@ ...@@ -37,42 +37,38 @@
#include <asm/mipsmtregs.h> #include <asm/mipsmtregs.h>
#include <asm/system.h> #include <asm/system.h>
static inline void unmask_mips_irq(unsigned int irq) static inline void unmask_mips_irq(struct irq_data *d)
{ {
set_c0_status(0x100 << (irq - MIPS_CPU_IRQ_BASE)); set_c0_status(0x100 << (d->irq - MIPS_CPU_IRQ_BASE));
irq_enable_hazard(); irq_enable_hazard();
} }
static inline void mask_mips_irq(unsigned int irq) static inline void mask_mips_irq(struct irq_data *d)
{ {
clear_c0_status(0x100 << (irq - MIPS_CPU_IRQ_BASE)); clear_c0_status(0x100 << (d->irq - MIPS_CPU_IRQ_BASE));
irq_disable_hazard(); irq_disable_hazard();
} }
static struct irq_chip mips_cpu_irq_controller = { static struct irq_chip mips_cpu_irq_controller = {
.name = "MIPS", .name = "MIPS",
.ack = mask_mips_irq, .irq_ack = mask_mips_irq,
.mask = mask_mips_irq, .irq_mask = mask_mips_irq,
.mask_ack = mask_mips_irq, .irq_mask_ack = mask_mips_irq,
.unmask = unmask_mips_irq, .irq_unmask = unmask_mips_irq,
.eoi = unmask_mips_irq, .irq_eoi = unmask_mips_irq,
}; };
/* /*
* Basically the same as above but taking care of all the MT stuff * Basically the same as above but taking care of all the MT stuff
*/ */
#define unmask_mips_mt_irq unmask_mips_irq static unsigned int mips_mt_cpu_irq_startup(struct irq_data *d)
#define mask_mips_mt_irq mask_mips_irq
static unsigned int mips_mt_cpu_irq_startup(unsigned int irq)
{ {
unsigned int vpflags = dvpe(); unsigned int vpflags = dvpe();
clear_c0_cause(0x100 << (irq - MIPS_CPU_IRQ_BASE)); clear_c0_cause(0x100 << (d->irq - MIPS_CPU_IRQ_BASE));
evpe(vpflags); evpe(vpflags);
unmask_mips_mt_irq(irq); unmask_mips_irq(d);
return 0; return 0;
} }
...@@ -80,22 +76,22 @@ static unsigned int mips_mt_cpu_irq_startup(unsigned int irq) ...@@ -80,22 +76,22 @@ static unsigned int mips_mt_cpu_irq_startup(unsigned int irq)
* While we ack the interrupt interrupts are disabled and thus we don't need * While we ack the interrupt interrupts are disabled and thus we don't need
* to deal with concurrency issues. Same for mips_cpu_irq_end. * to deal with concurrency issues. Same for mips_cpu_irq_end.
*/ */
static void mips_mt_cpu_irq_ack(unsigned int irq) static void mips_mt_cpu_irq_ack(struct irq_data *d)
{ {
unsigned int vpflags = dvpe(); unsigned int vpflags = dvpe();
clear_c0_cause(0x100 << (irq - MIPS_CPU_IRQ_BASE)); clear_c0_cause(0x100 << (d->irq - MIPS_CPU_IRQ_BASE));
evpe(vpflags); evpe(vpflags);
mask_mips_mt_irq(irq); mask_mips_irq(d);
} }
static struct irq_chip mips_mt_cpu_irq_controller = { static struct irq_chip mips_mt_cpu_irq_controller = {
.name = "MIPS", .name = "MIPS",
.startup = mips_mt_cpu_irq_startup, .irq_startup = mips_mt_cpu_irq_startup,
.ack = mips_mt_cpu_irq_ack, .irq_ack = mips_mt_cpu_irq_ack,
.mask = mask_mips_mt_irq, .irq_mask = mask_mips_irq,
.mask_ack = mips_mt_cpu_irq_ack, .irq_mask_ack = mips_mt_cpu_irq_ack,
.unmask = unmask_mips_mt_irq, .irq_unmask = unmask_mips_irq,
.eoi = unmask_mips_mt_irq, .irq_eoi = unmask_mips_irq,
}; };
void __init mips_cpu_irq_init(void) void __init mips_cpu_irq_init(void)
......
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