summaryrefslogtreecommitdiff
path: root/arch/ppc/syslib/open_pic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/syslib/open_pic.c')
-rw-r--r--arch/ppc/syslib/open_pic.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c
index e1dcfea8ba02..2a922f21a449 100644
--- a/arch/ppc/syslib/open_pic.c
+++ b/arch/ppc/syslib/open_pic.c
@@ -610,12 +610,15 @@ void openpic_request_IPIs(void)
void __devinit do_openpic_setup_cpu(void)
{
+#ifdef CONFIG_IRQ_ALL_CPUS
int i;
- u32 msk = 1 << smp_hw_index[smp_processor_id()];
-
+ u32 msk;
+#endif
spin_lock(&openpic_setup_lock);
#ifdef CONFIG_IRQ_ALL_CPUS
+ msk = 1 << smp_hw_index[smp_processor_id()];
+
/* let the openpic know we want intrs. default affinity
* is 0xffffffff until changed via /proc
* That's how it's done on x86. If we want it differently, then
@@ -788,15 +791,25 @@ static void openpic_set_sense(u_int irq, int sense)
*/
static void openpic_ack_irq(unsigned int irq_nr)
{
+#ifdef __SLOW_VERSION__
openpic_disable_irq(irq_nr);
openpic_eoi();
+#else
+ if ((irq_desc[irq_nr].status & IRQ_LEVEL) == 0)
+ openpic_eoi();
+#endif
}
static void openpic_end_irq(unsigned int irq_nr)
{
+#ifdef __SLOW_VERSION__
if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))
&& irq_desc[irq_nr].action)
openpic_enable_irq(irq_nr);
+#else
+ if ((irq_desc[irq_nr].status & IRQ_LEVEL) != 0)
+ openpic_eoi();
+#endif
}
static void openpic_set_affinity(unsigned int irq_nr, unsigned long cpumask)