[MIPS] IRQ cleanups
This is a big irq cleanup patch. * Use set_irq_chip() to register irq_chip. * Initialize .mask, .unmask, .mask_ack field. Functions for these method are already exist in most case. * Do not initialize .startup, .shutdown, .enable, .disable fields if default routines provided by irq_chip_set_defaults() were suitable. * Remove redundant irq_desc initializations. * Remove unnecessary local_irq_save/local_irq_restore, spin_lock. With this cleanup, it would be easy to switch to slightly lightwait irq flow handlers (handle_level_irq(), etc.) instead of __do_IRQ(). Though whole this patch is quite large, changes in each irq_chip are not quite simple. Please review and test on your platform. Thanks. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Este commit está contenido en:

cometido por
Ralf Baechle

padre
c87b6ebaea
commit
1603b5aca4
@@ -28,14 +28,6 @@ static void enable_r4030_irq(unsigned int irq)
|
||||
spin_unlock_irqrestore(&r4030_lock, flags);
|
||||
}
|
||||
|
||||
static unsigned int startup_r4030_irq(unsigned int irq)
|
||||
{
|
||||
enable_r4030_irq(irq);
|
||||
return 0; /* never anything pending */
|
||||
}
|
||||
|
||||
#define shutdown_r4030_irq disable_r4030_irq
|
||||
|
||||
void disable_r4030_irq(unsigned int irq)
|
||||
{
|
||||
unsigned int mask = ~(1 << (irq - JAZZ_PARALLEL_IRQ));
|
||||
@@ -47,8 +39,6 @@ void disable_r4030_irq(unsigned int irq)
|
||||
spin_unlock_irqrestore(&r4030_lock, flags);
|
||||
}
|
||||
|
||||
#define mask_and_ack_r4030_irq disable_r4030_irq
|
||||
|
||||
static void end_r4030_irq(unsigned int irq)
|
||||
{
|
||||
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
|
||||
@@ -57,11 +47,10 @@ static void end_r4030_irq(unsigned int irq)
|
||||
|
||||
static struct irq_chip r4030_irq_type = {
|
||||
.typename = "R4030",
|
||||
.startup = startup_r4030_irq,
|
||||
.shutdown = shutdown_r4030_irq,
|
||||
.enable = enable_r4030_irq,
|
||||
.disable = disable_r4030_irq,
|
||||
.ack = mask_and_ack_r4030_irq,
|
||||
.ack = disable_r4030_irq,
|
||||
.mask = disable_r4030_irq,
|
||||
.mask_ack = disable_r4030_irq,
|
||||
.unmask = enable_r4030_irq,
|
||||
.end = end_r4030_irq,
|
||||
};
|
||||
|
||||
@@ -69,12 +58,8 @@ void __init init_r4030_ints(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = JAZZ_PARALLEL_IRQ; i <= JAZZ_TIMER_IRQ; i++) {
|
||||
irq_desc[i].status = IRQ_DISABLED;
|
||||
irq_desc[i].action = 0;
|
||||
irq_desc[i].depth = 1;
|
||||
irq_desc[i].chip = &r4030_irq_type;
|
||||
}
|
||||
for (i = JAZZ_PARALLEL_IRQ; i <= JAZZ_TIMER_IRQ; i++)
|
||||
set_irq_chip(i, &r4030_irq_type);
|
||||
|
||||
r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, 0);
|
||||
r4030_read_reg16(JAZZ_IO_IRQ_SOURCE); /* clear pending IRQs */
|
||||
|
Referencia en una nueva incidencia
Block a user