linux-mips
[Top] [All Lists]

Re: [patch 14/38] mips: gic: Convert to new irq_chip functions

To: Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [patch 14/38] mips: gic: Convert to new irq_chip functions
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Thu, 24 Mar 2011 15:22:00 +0300
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
In-reply-to: <20110323210535.903372061@linutronix.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20110323210437.398062704@linutronix.de> <20110323210535.903372061@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:08, Thomas Gleixner wrote:

Signed-off-by: Thomas Gleixner<tglx@linutronix.de>
---
  arch/mips/kernel/irq-gic.c |   44 ++++++++++++++++++--------------------------
  1 file changed, 18 insertions(+), 26 deletions(-)

Index: linux-mips-next/arch/mips/kernel/irq-gic.c
===================================================================
--- linux-mips-next.orig/arch/mips/kernel/irq-gic.c
+++ linux-mips-next/arch/mips/kernel/irq-gic.c
@@ -87,17 +87,9 @@ unsigned int gic_get_int(void)
        return i;
  }

-static unsigned int gic_irq_startup(unsigned int irq)
+static void gic_irq_ack(struct irq_data *d)
  {
-       irq -= _irqbase;
-       pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq);
-       GIC_SET_INTR_MASK(irq);
-       return 0;
-}
-
-static void gic_irq_ack(unsigned int irq)
-{
-       irq -= _irqbase;
+       unsigned int irq = d->irq - _irqbase;

   The style of this file assumes empty lines aftrer the declaration block:

@@ -123,13 +115,14 @@ static void gic_unmask_irq(unsigned int

  static DEFINE_SPINLOCK(gic_lock);

-static int gic_set_affinity(unsigned int irq, const struct cpumask *cpumask)
+static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
+                           bool force)
  {
+       unsigned int irq = d->irq - _irqbase;
        cpumask_t       tmp = CPU_MASK_NONE;
        unsigned long   flags;
        int             i;

-       irq -= _irqbase;
        pr_debug("%s(%d) called\n", __func__, irq);
        cpumask_and(&tmp, cpumask, cpu_online_mask);
        if (cpus_empty(tmp))

WBR, Sergei

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