fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / ppc / syslib / open_pic.c
index 8947797..18ec947 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling
- *
  *  Copyright (C) 1997 Geert Uytterhoeven
  *
  *  This file is subject to the terms and conditions of the GNU General Public
@@ -8,7 +6,6 @@
  *  for more details.
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -48,7 +45,7 @@ static u_int NumSources;
 static int open_pic_irq_offset;
 static volatile OpenPIC_Source __iomem *ISR[NR_IRQS];
 static int openpic_cascade_irq = -1;
-static int (*openpic_cascade_fn)(struct pt_regs *);
+static int (*openpic_cascade_fn)(void);
 
 /* Global Operations */
 static void openpic_disable_8259_pass_through(void);
@@ -57,7 +54,7 @@ static void openpic_set_spurious(u_int vector);
 #ifdef CONFIG_SMP
 /* Interprocessor Interrupts */
 static void openpic_initipi(u_int ipi, u_int pri, u_int vector);
-static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *);
+static irqreturn_t openpic_ipi_action(int cpl, void *dev_id);
 #endif
 
 /* Timer Interrupts */
@@ -218,7 +215,7 @@ static void openpic_safe_writefield(volatile u_int __iomem *addr, u_int mask,
 u_int openpic_read_IPI(volatile u_int __iomem * addr)
 {
          u_int val = 0;
-#if defined(OPENPIC_BIG_ENDIAN) || defined(CONFIG_POWER3)
+#if defined(OPENPIC_BIG_ENDIAN)
         val = in_be32(addr);
 #else
         val = in_le32(addr);
@@ -375,7 +372,7 @@ void __init openpic_init(int offset)
                                OPENPIC_VEC_IPI+i+offset);
                /* IPIs are per-CPU */
                irq_desc[OPENPIC_VEC_IPI+i+offset].status |= IRQ_PER_CPU;
-               irq_desc[OPENPIC_VEC_IPI+i+offset].handler = &open_pic_ipi;
+               irq_desc[OPENPIC_VEC_IPI+i+offset].chip = &open_pic_ipi;
        }
 #endif
 
@@ -410,7 +407,7 @@ void __init openpic_init(int offset)
 
        /* Init descriptors */
        for (i = offset; i < NumSources + offset; i++)
-               irq_desc[i].handler = &open_pic;
+               irq_desc[i].chip = &open_pic;
 
        /* Initialize the spurious interrupt */
        if (ppc_md.progress) ppc_md.progress("openpic: spurious",0x3bd);
@@ -578,18 +575,21 @@ void openpic_request_IPIs(void)
        if (OpenPIC == NULL)
                return;
 
-       /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */
+       /*
+        * IPIs are marked IRQF_DISABLED as they must run with irqs
+        * disabled
+        */
        request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset,
-                   openpic_ipi_action, SA_INTERRUPT,
+                   openpic_ipi_action, IRQF_DISABLED,
                    "IPI0 (call function)", NULL);
        request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+1,
-                   openpic_ipi_action, SA_INTERRUPT,
+                   openpic_ipi_action, IRQF_DISABLED,
                    "IPI1 (reschedule)", NULL);
        request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+2,
-                   openpic_ipi_action, SA_INTERRUPT,
+                   openpic_ipi_action, IRQF_DISABLED,
                    "IPI2 (invalidate tlb)", NULL);
        request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+3,
-                   openpic_ipi_action, SA_INTERRUPT,
+                   openpic_ipi_action, IRQF_DISABLED,
                    "IPI3 (xmon break)", NULL);
 
        for ( i = 0; i < OPENPIC_NUM_IPI ; i++ )
@@ -617,8 +617,8 @@ void __devinit do_openpic_setup_cpu(void)
        /* 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
-        * we should make sure we also change the default values of irq_affinity
-        * in irq.c.
+        * we should make sure we also change the default values of
+        * irq_desc[].affinity in irq.c.
         */
        for (i = 0; i < NumSources; i++)
                openpic_mapirq(i, msk, CPU_MASK_ALL);
@@ -694,13 +694,13 @@ openpic_init_nmi_irq(u_int irq)
 
 static struct irqaction openpic_cascade_irqaction = {
        .handler = no_action,
-       .flags = SA_INTERRUPT,
+       .flags = IRQF_DISABLED,
        .mask = CPU_MASK_NONE,
 };
 
 void __init
 openpic_hookup_cascade(u_int irq, char *name,
-       int (*cascade_fn)(struct pt_regs *))
+       int (*cascade_fn)(void))
 {
        openpic_cascade_irq = irq;
        openpic_cascade_fn = cascade_fn;
@@ -857,16 +857,16 @@ static void openpic_end_ipi(unsigned int irq_nr)
 {
 }
 
-static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
+static irqreturn_t openpic_ipi_action(int cpl, void *dev_id)
 {
-       smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset, regs);
+       smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset);
        return IRQ_HANDLED;
 }
 
 #endif /* CONFIG_SMP */
 
 int
-openpic_get_irq(struct pt_regs *regs)
+openpic_get_irq(void)
 {
        int irq = openpic_irq();
 
@@ -876,7 +876,7 @@ openpic_get_irq(struct pt_regs *regs)
         * This should move to irq.c eventually.  -- paulus
         */
        if (irq == openpic_cascade_irq && openpic_cascade_fn != NULL) {
-               int cirq = openpic_cascade_fn(regs);
+               int cirq = openpic_cascade_fn();
 
                /* Allow for the cascade being shared with other devices */
                if (cirq != -1) {