diff options
Diffstat (limited to 'arch/powerpc/platforms/cell/interrupt.c')
-rw-r--r-- | arch/powerpc/platforms/cell/interrupt.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index d7bbb61109f9..6b57a47c5d37 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -89,17 +89,17 @@ static struct irq_chip iic_chip = { | |||
89 | /* Get an IRQ number from the pending state register of the IIC */ | 89 | /* Get an IRQ number from the pending state register of the IIC */ |
90 | static unsigned int iic_get_irq(struct pt_regs *regs) | 90 | static unsigned int iic_get_irq(struct pt_regs *regs) |
91 | { | 91 | { |
92 | struct cbe_iic_pending_bits pending; | 92 | struct cbe_iic_pending_bits pending; |
93 | struct iic *iic; | 93 | struct iic *iic; |
94 | 94 | ||
95 | iic = &__get_cpu_var(iic); | 95 | iic = &__get_cpu_var(iic); |
96 | *(unsigned long *) &pending = | 96 | *(unsigned long *) &pending = |
97 | in_be64((unsigned long __iomem *) &iic->regs->pending_destr); | 97 | in_be64((unsigned long __iomem *) &iic->regs->pending_destr); |
98 | iic->eoi_stack[++iic->eoi_ptr] = pending.prio; | 98 | iic->eoi_stack[++iic->eoi_ptr] = pending.prio; |
99 | BUG_ON(iic->eoi_ptr > 15); | 99 | BUG_ON(iic->eoi_ptr > 15); |
100 | if (pending.flags & CBE_IIC_IRQ_VALID) | 100 | if (pending.flags & CBE_IIC_IRQ_VALID) |
101 | return irq_linear_revmap(iic->host, | 101 | return irq_linear_revmap(iic->host, |
102 | iic_pending_to_hwnum(pending)); | 102 | iic_pending_to_hwnum(pending)); |
103 | return NO_IRQ; | 103 | return NO_IRQ; |
104 | } | 104 | } |
105 | 105 | ||
@@ -250,16 +250,15 @@ static int __init setup_iic(void) | |||
250 | struct resource r0, r1; | 250 | struct resource r0, r1; |
251 | struct irq_host *host; | 251 | struct irq_host *host; |
252 | int found = 0; | 252 | int found = 0; |
253 | u32 *np; | 253 | const u32 *np; |
254 | 254 | ||
255 | for (dn = NULL; | 255 | for (dn = NULL; |
256 | (dn = of_find_node_by_name(dn,"interrupt-controller")) != NULL;) { | 256 | (dn = of_find_node_by_name(dn,"interrupt-controller")) != NULL;) { |
257 | if (!device_is_compatible(dn, | 257 | if (!device_is_compatible(dn, |
258 | "IBM,CBEA-Internal-Interrupt-Controller")) | 258 | "IBM,CBEA-Internal-Interrupt-Controller")) |
259 | continue; | 259 | continue; |
260 | np = (u32 *)get_property(dn, "ibm,interrupt-server-ranges", | 260 | np = get_property(dn, "ibm,interrupt-server-ranges", NULL); |
261 | NULL); | 261 | if (np == NULL) { |
262 | if (np == NULL) { | ||
263 | printk(KERN_WARNING "IIC: CPU association not found\n"); | 262 | printk(KERN_WARNING "IIC: CPU association not found\n"); |
264 | of_node_put(dn); | 263 | of_node_put(dn); |
265 | return -ENODEV; | 264 | return -ENODEV; |