summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-25 16:04:41 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-03-29 14:48:09 +0200
commit00e70bad1abba1f96f7b9e6454b222f393e5281f (patch)
treebae218609bcf61537207587680ffa28516a37652 /arch/powerpc
parent8c99f561395f59ba9ec926c8940a4446fdfd8103 (diff)
downloadlinux-00e70bad1abba1f96f7b9e6454b222f393e5281f.tar.gz
linux-00e70bad1abba1f96f7b9e6454b222f393e5281f.tar.bz2
linux-00e70bad1abba1f96f7b9e6454b222f393e5281f.zip
powerpc: cell: Fix the irq_desc access
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/cell/spider-pic.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c
index b38cdfc1deb8..bc27de4cf84f 100644
--- a/arch/powerpc/platforms/cell/spider-pic.c
+++ b/arch/powerpc/platforms/cell/spider-pic.c
@@ -102,7 +102,7 @@ static void spider_ack_irq(struct irq_data *d)
/* 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 irq_data *d, unsigned int type)
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 irq_data *d, unsigned int type)
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