]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/powerpc/platforms/pseries/xics.c
[PATCH] powerpc: Lack of ISA interrupts on XICS isn't dangerous
[linux-beck.git] / arch / powerpc / platforms / pseries / xics.c
index 4864cb32be250478de4705809c4403f8ca2eb630..b14f9b5c114edebf110120973e8fe43b4fa1168e 100644 (file)
@@ -168,7 +168,7 @@ static int pSeriesLP_xirr_info_get(int n_cpu)
        unsigned long return_value;
 
        lpar_rc = plpar_xirr(&return_value);
-       if (lpar_rc != H_Success)
+       if (lpar_rc != H_SUCCESS)
                panic(" bad return code xirr - rc = %lx \n", lpar_rc);
        return (int)return_value;
 }
@@ -179,7 +179,7 @@ static void pSeriesLP_xirr_info_set(int n_cpu, int value)
        unsigned long val64 = value & 0xffffffff;
 
        lpar_rc = plpar_eoi(val64);
-       if (lpar_rc != H_Success)
+       if (lpar_rc != H_SUCCESS)
                panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc,
                      val64);
 }
@@ -189,7 +189,7 @@ void pSeriesLP_cppr_info(int n_cpu, u8 value)
        unsigned long lpar_rc;
 
        lpar_rc = plpar_cppr(value);
-       if (lpar_rc != H_Success)
+       if (lpar_rc != H_SUCCESS)
                panic("bad return code cppr - rc = %lx\n", lpar_rc);
 }
 
@@ -198,7 +198,7 @@ static void pSeriesLP_qirr_info(int n_cpu , u8 value)
        unsigned long lpar_rc;
 
        lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value);
-       if (lpar_rc != H_Success)
+       if (lpar_rc != H_SUCCESS)
                panic("bad return code qirr - rc = %lx\n", lpar_rc);
 }
 
@@ -522,7 +522,7 @@ nextnode:
 
        np = of_find_node_by_type(NULL, "interrupt-controller");
        if (!np) {
-               printk(KERN_WARNING "xics: no ISA interrupt controller\n");
+               printk(KERN_DEBUG "xics: no ISA interrupt controller\n");
                xics_irq_8259_cascade_real = -1;
                xics_irq_8259_cascade = -1;
        } else {
@@ -641,23 +641,26 @@ void xics_teardown_cpu(int secondary)
        ops->cppr_info(cpu, 0x00);
        iosync();
 
+       /* Clear IPI */
+       ops->qirr_info(cpu, 0xff);
+
+       /*
+        * we need to EOI the IPI if we got here from kexec down IPI
+        *
+        * probably need to check all the other interrupts too
+        * should we be flagging idle loop instead?
+        * or creating some task to be scheduled?
+        */
+       ops->xirr_info_set(cpu, XICS_IPI);
+
        /*
         * Some machines need to have at least one cpu in the GIQ,
         * so leave the master cpu in the group.
         */
-       if (secondary) {
-               /*
-                * we need to EOI the IPI if we got here from kexec down IPI
-                *
-                * probably need to check all the other interrupts too
-                * should we be flagging idle loop instead?
-                * or creating some task to be scheduled?
-                */
-               ops->xirr_info_set(cpu, XICS_IPI);
+       if (secondary)
                rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
                        (1UL << interrupt_server_size) - 1 -
                        default_distrib_server, 0);
-       }
 }
 
 #ifdef CONFIG_HOTPLUG_CPU