linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Lennert Buytenhek <buytenh@secretlab.ca>, linuxppc-dev@lists.ozlabs.org
Subject: [patch 04/14] powerpc: cell: Fix the irq_desc access
Date: Fri, 25 Mar 2011 21:36:16 -0000	[thread overview]
Message-ID: <20110325164141.042264908@linutronix.de> (raw)
In-Reply-To: 20110325164049.138289403@linutronix.de

The core irq_set_type() function updates the flow type when the chip
callback returns 0. It also updates irq_data, so this can be used in
irq_ack() to check for the level bit. That avoids a redundant sparse
irq lookup.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/platforms/cell/spider-pic.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Index: linux-2.6-tip/arch/powerpc/platforms/cell/spider-pic.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/platforms/cell/spider-pic.c
+++ linux-2.6-tip/arch/powerpc/platforms/cell/spider-pic.c
@@ -102,7 +102,7 @@ static void spider_ack_irq(struct irq_da
 
 	/* Reset edge detection logic if necessary
 	 */
-	if (irq_to_desc(d->irq)->status & IRQ_LEVEL)
+	if (irqd_is_level_type(d))
 		return;
 
 	/* Only interrupts 47 to 50 can be set to edge */
@@ -119,7 +119,6 @@ static int spider_set_irq_type(struct ir
 	struct spider_pic *pic = spider_virq_to_pic(d->irq);
 	unsigned int hw = irq_map[d->irq].hwirq;
 	void __iomem *cfg = spider_get_irq_config(pic, hw);
-	struct irq_desc *desc = irq_to_desc(d->irq);
 	u32 old_mask;
 	u32 ic;
 
@@ -147,12 +146,6 @@ static int spider_set_irq_type(struct ir
 		return -EINVAL;
 	}
 
-	/* Update irq_desc */
-	desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
-	desc->status |= type & IRQ_TYPE_SENSE_MASK;
-	if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
-		desc->status |= IRQ_LEVEL;
-
 	/* Configure the source. One gross hack that was there before and
 	 * that I've kept around is the priority to the BE which I set to
 	 * be the same as the interrupt source number. I don't know wether

  parent reply	other threads:[~2011-03-25 22:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 21:36 [patch 00/14] powerpc: Final irq bits for .39 Thomas Gleixner
2011-03-25 21:36 ` [patch 01/14] powerpc: Use proper accessors for IRQ_* flags Thomas Gleixner
2011-03-25 21:36 ` [patch 02/14] powerpc: media5200: Remove pointless set_irq_type() Thomas Gleixner
2011-03-25 21:36 ` Thomas Gleixner [this message]
2011-03-25 21:36 ` [patch 03/14] powerpc: mac: pic: Use irqd_is_level_type() Thomas Gleixner
2011-03-25 21:36 ` [patch 05/14] powerpc: cpm2_pic: Cleanup flow type handling Thomas Gleixner
2011-03-25 21:36 ` [patch 07/14] powerpc: ipic: " Thomas Gleixner
2011-03-25 21:36 ` [patch 06/14] powerpc: cpm2_pic: Use IRQCHIP_EOI_IF_HANDLED Thomas Gleixner
2011-03-25 21:36 ` [patch 08/14] powerpc: mpc8xx_pic: Cleanup flow type handling Thomas Gleixner
2011-03-25 21:36 ` [patch 09/14] powerpc: mpic: " Thomas Gleixner
2011-03-25 21:36 ` [patch 10/14] powerpc: uic: " Thomas Gleixner
2011-03-25 21:36 ` [patch 11/14] powerpc: xilinx: " Thomas Gleixner
2011-03-25 21:36 ` [patch 12/14] powerpc: irq: Use irqdata based information Thomas Gleixner
2011-03-25 21:36 ` [patch 13/14] powerpc: Convert to new irq_* function names Thomas Gleixner
2011-03-25 21:36 ` [patch 14/14] powerpc: Use generic show_interrupts() Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110325164141.042264908@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=benh@kernel.crashing.org \
    --cc=buytenh@secretlab.ca \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).