[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: suppress warning messages on IO-APIC-less systems



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1334669825 -7200
# Node ID cf129a80e47e3664eb14070600a3b5c8c2a60440
# Parent  03cb64abd7c27b5cde4d97bbb447c9d33f808ccb
x86: suppress warning messages on IO-APIC-less systems

Each call to mp_register_gsi() so far produced two warnings (about not
being able to find the corresponding IO-APIC pin).

However, we should use the provided information for setting the ELCR
correctly (we might want to even do this when there is an IO-APIC, if
was absolutely certain that all machines really have this register
[and specifically not some other device at the two I/O ports in
question]). It is in any case questionable that we allow Dom0 to set
this register - it could particularly be the interrupt of a plug-in
serial port card that might not work due to this. The problem is that
all Dom0 kernels to date do so, hence we can't simply #GP on such an
access (which would be the result if we disallowed access to the port
as we should have done from the beginning).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 03cb64abd7c2 -r cf129a80e47e xen/arch/x86/mpparse.c
--- a/xen/arch/x86/mpparse.c    Tue Apr 17 15:36:34 2012 +0200
+++ b/xen/arch/x86/mpparse.c    Tue Apr 17 15:37:05 2012 +0200
@@ -1034,6 +1034,21 @@ int mp_register_gsi (u32 gsi, int trigge
                return gsi;
 #endif
 
+       if (!nr_ioapics) {
+               unsigned int port = 0x4d0 + (gsi >> 3);
+               u8 val;
+
+               if (!platform_legacy_irq(gsi))
+                       return -EINVAL;
+               val = inb(port);
+               if (triggering)
+                       val |= 1 << (gsi & 7);
+               else
+                       val &= ~(1 << (gsi & 7));
+               outb(val, port);
+               return 0;
+       }
+
        ioapic = mp_find_ioapic(gsi);
        if (ioapic < 0) {
                printk(KERN_WARNING "No IOAPIC for GSI %u\n", gsi);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.