summaryrefslogtreecommitdiff
path: root/arch/ppc/syslib/open_pic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2004-02-05 04:36:49 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-02-05 04:36:49 -0800
commit29052d817ebbc4065e14d1f07fadc613fa06449b (patch)
tree0789be5d65ab07385473941f75d9778b33e2caef /arch/ppc/syslib/open_pic.c
parent12a981f8fd62fb34823626844a5c76d6614055fe (diff)
parent4d41d2454360871a9bb538f2b1396a7c67aa92f9 (diff)
Merge PPC update
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)