linux-mips
[Top] [All Lists]

Re: [PATCH] mips irq cleanups

To: linux-mips@linux-mips.org
Subject: Re: [PATCH] mips irq cleanups
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Sun, 12 Nov 2006 01:04:57 +0900 (JST)
Cc: ralf@linux-mips.org
In-reply-to: <20061102.020836.25912635.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20061102.020836.25912635.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 02 Nov 2006 02:08:36 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> 
wrote:
> 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.

I missed some cleanups in irq_cpu.c.  Here is a patch against the
patch.  I can send revised whole patch if you want.


Subject: [PATCH] mips irq cleanups (missing bits in irq_cpu.c)

remove unneeded mips_cpu_irq_ack and initialize .mask_ack of
mips_cpu_irq_controller and mips_mt_cpu_irq_controller.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
index 79fea0f..3b7cfa4 100644
--- a/arch/mips/kernel/irq_cpu.c
+++ b/arch/mips/kernel/irq_cpu.c
@@ -50,15 +50,6 @@ static inline void mask_mips_irq(unsigne
        irq_disable_hazard();
 }
 
-/*
- * 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.
- */
-static void mips_cpu_irq_ack(unsigned int irq)
-{
-       mask_mips_irq(irq);
-}
-
 static void mips_cpu_irq_end(unsigned int irq)
 {
        if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
@@ -67,8 +58,9 @@ static void mips_cpu_irq_end(unsigned in
 
 static struct irq_chip mips_cpu_irq_controller = {
        .typename       = "MIPS",
-       .ack            = mips_cpu_irq_ack,
+       .ack            = mask_mips_irq,
        .mask           = mask_mips_irq,
+       .mask_ack       = mask_mips_irq,
        .unmask         = unmask_mips_irq,
        .end            = mips_cpu_irq_end,
 };
@@ -110,6 +102,7 @@ static struct irq_chip mips_mt_cpu_irq_c
        .startup        = mips_mt_cpu_irq_startup,
        .ack            = mips_mt_cpu_irq_ack,
        .mask           = mask_mips_mt_irq,
+       .mask_ack       = mips_mt_cpu_irq_ack,
        .unmask         = unmask_mips_mt_irq,
        .end            = mips_mt_cpu_irq_end,
 };

<Prev in Thread] Current Thread [Next in Thread>