linux-mips
[Top] [All Lists]

Re: [patch 37/38] mips: vr41xx: Cleanup the direct access to irq_desc[]

To: Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [patch 37/38] mips: vr41xx: Cleanup the direct access to irq_desc[]
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Thu, 24 Mar 2011 15:44:44 +0300
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
In-reply-to: <20110323210538.070462971@linutronix.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20110323210437.398062704@linutronix.de> <20110323210538.070462971@linutronix.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
Hello.

On 24.03.2011 0:09, Thomas Gleixner wrote:

Tons of unused code, but that's Ralfs problem.

Signed-off-by: Thomas Gleixner<tglx@linutronix.de>
[...]

Index: linux-mips-next/arch/mips/vr41xx/common/irq.c
===================================================================
--- linux-mips-next.orig/arch/mips/vr41xx/common/irq.c
+++ linux-mips-next/arch/mips/vr41xx/common/irq.c
@@ -62,7 +62,6 @@ EXPORT_SYMBOL_GPL(cascade_irq);
  static void irq_dispatch(unsigned int irq)
  {
        irq_cascade_t *cascade;
-       struct irq_desc *desc;

        if (irq>= NR_IRQS) {
                atomic_inc(&irq_err_count);
@@ -71,14 +70,16 @@ static void irq_dispatch(unsigned int ir

        cascade = irq_cascade + irq;
        if (cascade->get_irq != NULL) {
-               unsigned int source_irq = irq;
+               struct irq_desc *desc = irq_to_desc(irq);
+               struct irq_data *idata = irq_desc_get_irq_data(desc);
+               struct irq_chip *chip = irq_desc_get_chip(desc);
                int ret;
-               desc = irq_desc + source_irq;
-               if (desc->chip->mask_ack)
-                       desc->chip->mask_ack(source_irq);
+
+               if (chip->irq_mask_ack)
+                       chip->irq_mask_ack(idata);
                else {
-                       desc->chip->mask(source_irq);
-                       desc->chip->ack(source_irq);
+                       chip->irq_mask(idata);
+                       chip->irq_ack(idata);
                }
                ret = cascade->get_irq(irq);
                irq = ret;
@@ -86,8 +87,8 @@ static void irq_dispatch(unsigned int ir
                        atomic_inc(&irq_err_count);
                else
                        irq_dispatch(irq);
-               if (!(desc->status&  IRQ_DISABLED)&&  desc->chip->unmask)
-                       desc->chip->unmask(source_irq);
+               if (!(desc->status&  IRQ_DISABLED)&&  chip->irq_unmask)
+                       chip->irq_unmask(idata);

   Hm, doesn't this (I mean the old) code break after the previous patch?

WBR, Sergei

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