WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Revert 19178:4fcf4c9c9751ccb8ed

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Revert 19178:4fcf4c9c9751ccb8ed
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Feb 2009 01:35:36 -0800
Delivery-date: Tue, 10 Feb 2009 01:36:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1234183586 0
# Node ID e15d25401309eb374c8b65c91b24c187631ea652
# Parent  57e98fc0d9565d8ab6764436434a65638c332dbe
Revert 19178:4fcf4c9c9751ccb8ed

Breaks boot on every box under the sun it seems.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/io_apic.c    |   15 ++++-----------
 xen/arch/x86/irq.c        |    6 ++++--
 xen/arch/x86/smpboot.c    |    2 ++
 xen/include/asm-x86/irq.h |   31 +++++++++++++++----------------
 4 files changed, 25 insertions(+), 29 deletions(-)

diff -r 57e98fc0d956 -r e15d25401309 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Fri Feb 06 11:18:45 2009 +0000
+++ b/xen/arch/x86/io_apic.c    Mon Feb 09 12:46:26 2009 +0000
@@ -39,10 +39,6 @@
 #include <io_ports.h>
 #include <public/physdev.h>
 
-
-#define IO_APIC_IRQ(irq)    (!IS_LEGACY_IRQ(irq))
-#define IO_APIC_VECTOR(irq) (ioapic_irq_vector[irq])
-
 /* Different to Linux: our implementation can be simpler. */
 #define make_8259A_irq(irq) (io_apic_irqs &= ~(1<<(irq)))
 
@@ -666,8 +662,8 @@ static inline int IO_APIC_irq_trigger(in
     return 0;
 }
 
-/* irq vectors are indexed by the sum of all RTEs in all I/O APICs. */
-u8 ioapic_irq_vector[NR_IRQS] __read_mostly;
+/* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
+u8 irq_vector[NR_IRQS] __read_mostly;
 
 static struct hw_interrupt_type ioapic_level_type;
 static struct hw_interrupt_type ioapic_edge_type;
@@ -744,7 +740,6 @@ static void __init setup_IO_APIC_irqs(vo
 
             if (IO_APIC_IRQ(irq)) {
                 vector = assign_irq_vector(irq);
-                ioapic_irq_vector[irq] = vector;
                 entry.vector = vector;
                 ioapic_register_intr(irq, vector, IOAPIC_AUTO);
                
@@ -938,9 +933,9 @@ void /*__init*/ __print_IO_APIC(void)
         struct irq_pin_list *entry = irq_2_pin + i;
         if (entry->pin < 0)
             continue;
-        printk(KERN_DEBUG "IRQ%-3d (vec %3d)", i, IO_APIC_VECTOR(i));
+        printk(KERN_DEBUG "IRQ%d ", IO_APIC_VECTOR(i));
         for (;;) {
-            printk(" -> %d:%d", entry->apic, entry->pin);
+            printk("-> %d:%d", entry->apic, entry->pin);
             if (!entry->next)
                 break;
             entry = irq_2_pin + entry->next;
@@ -1667,7 +1662,6 @@ static inline void check_timer(void)
      */
     disable_8259A_irq(0);
     vector = assign_irq_vector(0);
-    ioapic_irq_vector[0] = vector;
 
     irq_desc[IO_APIC_VECTOR(0)].action = irq_desc[LEGACY_VECTOR(0)].action;
     irq_desc[IO_APIC_VECTOR(0)].depth  = 0;
@@ -2025,7 +2019,6 @@ int io_apic_set_pci_routing (int ioapic,
         add_pin_to_irq(irq, ioapic, pin);
 
     entry.vector = assign_irq_vector(irq);
-    ioapic_irq_vector[irq] = entry.vector;
 
     apic_printk(APIC_DEBUG, KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry "
                "(%d-%d -> 0x%x -> IRQ %d Mode:%i Active:%i)\n", ioapic,
diff -r 57e98fc0d956 -r e15d25401309 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Fri Feb 06 11:18:45 2009 +0000
+++ b/xen/arch/x86/irq.c        Mon Feb 09 12:46:26 2009 +0000
@@ -82,9 +82,9 @@ int assign_irq_vector(int irq)
 
     spin_lock(&vector_lock);
 
-    if ((irq != AUTO_ASSIGN) && (ioapic_irq_vector[irq] > 0)) {
+    if ((irq != AUTO_ASSIGN) && (IO_APIC_VECTOR(irq) > 0)) {
         spin_unlock(&vector_lock);
-        return ioapic_irq_vector[irq];
+        return IO_APIC_VECTOR(irq);
     }
 
     vector = current_vector;
@@ -101,6 +101,8 @@ int assign_irq_vector(int irq)
 
     current_vector = vector;
     vector_irq[vector] = irq;
+    if (irq != AUTO_ASSIGN)
+        IO_APIC_VECTOR(irq) = vector;
 
     spin_unlock(&vector_lock);
 
diff -r 57e98fc0d956 -r e15d25401309 xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Fri Feb 06 11:18:45 2009 +0000
+++ b/xen/arch/x86/smpboot.c    Mon Feb 09 12:46:26 2009 +0000
@@ -1477,6 +1477,7 @@ void __init smp_intr_init(void)
         * IRQ0 must be given a fixed assignment and initialized,
         * because it's used before the IO-APIC is set up.
         */
+       irq_vector[0] = FIRST_HIPRIORITY_VECTOR;
        vector_irq[FIRST_HIPRIORITY_VECTOR] = 0;
 
        /*
@@ -1486,6 +1487,7 @@ void __init smp_intr_init(void)
        for (seridx = 0; seridx < 2; seridx++) {
                if ((irq = serial_irq(seridx)) < 0)
                        continue;
+               irq_vector[irq] = FIRST_HIPRIORITY_VECTOR + seridx + 1;
                vector_irq[FIRST_HIPRIORITY_VECTOR + seridx + 1] = irq;
        }
 
diff -r 57e98fc0d956 -r e15d25401309 xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h Fri Feb 06 11:18:45 2009 +0000
+++ b/xen/include/asm-x86/irq.h Mon Feb 09 12:46:26 2009 +0000
@@ -7,20 +7,21 @@
 #include <asm/atomic.h>
 #include <irq_vectors.h>
 
-#define IS_LEGACY_IRQ(irq) (((irq) < 16) && !((1 << (irq)) & io_apic_irqs))
+#define IO_APIC_IRQ(irq)    (((irq) >= 16) || ((1<<(irq)) & io_apic_irqs))
+#define IO_APIC_VECTOR(irq) (irq_vector[irq])
+
 #define LEGACY_VECTOR(irq)          ((irq) + FIRST_LEGACY_VECTOR)
 #define LEGACY_IRQ_FROM_VECTOR(vec) ((vec) - FIRST_LEGACY_VECTOR)
 
-/* Special IRQ numbers */
+#define irq_to_vector(irq)  \
+    (IO_APIC_IRQ(irq) ? IO_APIC_VECTOR(irq) : LEGACY_VECTOR(irq))
+#define vector_to_irq(vec)  (vector_irq[vec])
+
+extern int vector_irq[NR_VECTORS];
+extern u8 irq_vector[NR_IRQS];
 #define AUTO_ASSIGN    -1
 #define NEVER_ASSIGN   -2
 #define FREE_TO_ASSIGN -3
-extern int vector_irq[NR_VECTORS];
-extern u8 ioapic_irq_vector[NR_IRQS];
-
-#define vector_to_irq(vec)              (vector_irq[vec])
-#define irq_to_vector(irq) \
-    (IS_LEGACY_IRQ(irq) ? LEGACY_VECTOR(irq) : ioapic_irq_vector[irq])
 
 #define platform_legacy_irq(irq)       ((irq) < 16)
 
@@ -59,14 +60,12 @@ int get_free_pirq(struct domain *d, int 
 int get_free_pirq(struct domain *d, int type, int index);
 void free_domain_pirqs(struct domain *d);
 
-#define domain_irq_to_vector(d, irq)                            \
-    ((d)->arch.pirq_vector[irq] ? (d)->arch.pirq_vector[irq] :  \
-     IS_LEGACY_IRQ(irq) ? LEGACY_VECTOR(irq) : 0)
-
-#define domain_vector_to_irq(d, vec)                                    \
-    ((d)->arch.vector_pirq[vec] ? (d)->arch.vector_pirq[vec] :          \
-     ((vec) < FIRST_LEGACY_VECTOR || (vec) > LAST_LEGACY_VECTOR) ?      \
-     0 : LEGACY_IRQ_FROM_VECTOR(vec))
+#define domain_irq_to_vector(d, irq) ((d)->arch.pirq_vector[irq] ?: \
+                                      IO_APIC_IRQ(irq) ? 0 : 
LEGACY_VECTOR(irq))
+#define domain_vector_to_irq(d, vec) ((d)->arch.vector_pirq[vec] ?: \
+                                      ((vec) < FIRST_LEGACY_VECTOR || \
+                                       (vec) > LAST_LEGACY_VECTOR) ? \
+                                      0 : LEGACY_IRQ_FROM_VECTOR(vec))
 
 int pirq_guest_force_unbind(struct domain *d, int irq);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Revert 19178:4fcf4c9c9751ccb8ed, Xen patchbot-unstable <=