XIVE.patch - XIVE needs to be set to 0xFF before deconfiguring a slot

Linda Xie lxie at us.ibm.com
Sat Aug 16 06:17:11 EST 2003


Hi,
When attempting to remove an I/O slot, RTAS isolation is complaining that
there are still XIVE(Extend Interrupt Vector) entries associated with the
slot. Setting the priority of 0xFF(lthe lowest) effectively disables the
XIVEs
in firmware.

The attached patch set XIVE to 0xFF, so an  I/O slot can be deconfigured.


Linda


diff -urpN linux-2.6-orig/arch/ppc64/kernel/xics.c linux-2.6
/arch/ppc64/kernel/xics.c
--- linux-2.6-orig/arch/ppc64/kernel/xics.c     2003-07-29
14:23:55.000000000 -0500
+++ linux-2.6/arch/ppc64/kernel/xics.c    2003-07-29 14:32:03.000000000
-0500
@@ -255,6 +255,7 @@ void xics_disable_irq(u_int virq)
 {
      u_int irq;
      long call_status;
+     unsigned int server;

      virq -= XICS_IRQ_OFFSET;
      irq = virt_irq_to_real(virq);
@@ -267,6 +268,24 @@ void xics_disable_irq(u_int virq)
                   irq, call_status);
            return;
      }
+#ifdef CONFIG_IRQ_ALL_CPUS
+     if (smp_threads_ready)
+           server = default_distrib_server;
+     else
+           server = default_server;
+#else
+     server = default_server;
+#endif
+
+     call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server,
+                             0xff);
+
+     if (call_status != 0) {
+           printk("xics_disable_irq: irq=%x: ibm_set_xive(0xff) returned
%lx\n",
+                 irq, call_status);
+           return;
+     }
+
 }

 void xics_end_irq(u_int      irq)


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list