summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tags/2.6.21-2/20962_linux-2.6-xen-irq_vector-uninitialize.patch')
-rw-r--r--tags/2.6.21-2/20962_linux-2.6-xen-irq_vector-uninitialize.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/tags/2.6.21-2/20962_linux-2.6-xen-irq_vector-uninitialize.patch b/tags/2.6.21-2/20962_linux-2.6-xen-irq_vector-uninitialize.patch
new file mode 100644
index 0000000..35e4063
--- /dev/null
+++ b/tags/2.6.21-2/20962_linux-2.6-xen-irq_vector-uninitialize.patch
@@ -0,0 +1,74 @@
+# HG changeset patch
+# User ehabkost@localhost.localdomain
+# Date 1187635504 10800
+# Node ID e1ccc85dfd7c00b7f104838247a868215ad0f748
+# Parent af6283d73d0702d1f394f798add1e0f5a73f49f6
+Don't initialize irq_cfg[].vector under Xen
+
+On linux-2.6.20-xen-3.1.0, irq_cfg 'vector' field contents were on
+a separated array, irq_vector, and it was not pre-initialized on Xen
+(but it was pre-initialized on the upstream non-Xen code). Somewhere
+between 2.6.20 and 2.6.21, the array contents were moved to irq_cfg[],
+but the Xen code was not changed to keep it not being initialized.
+
+This patches fix this. It creates an irq_cfg_element() macro to make
+the field be initialized on the non-Xen case without duplicating the
+array initialization.
+
+This fixes SATA timeout problems I had on a Dell Precision
+490 machine, and hopefully fixes the problems reported on Fedora
+bug #252301.
+
+diff -r af6283d73d07 -r e1ccc85dfd7c arch/x86_64/kernel/io_apic-xen.c
+--- a/arch/x86_64/kernel/io_apic-xen.c Tue Jul 17 20:26:41 2007 +0200
++++ b/arch/x86_64/kernel/io_apic-xen.c Mon Aug 20 15:45:04 2007 -0300
+@@ -56,24 +56,33 @@ struct irq_cfg {
+ u8 move_in_progress : 1;
+ };
+
++#ifdef CONFIG_XEN
++/* irq_cfg[].vector is not pre-initialized on Xen */
++#define irq_cfg_element(idx, vec) \
++ [idx] = { .domain = CPU_MASK_ALL, }
++#else
++#define irq_cfg_element(idx, vec) \
++ [idx] = { .domain = CPU_MASK_ALL, .vector = vec, }
++#endif
++
+ /* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */
+ struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = {
+- [0] = { .domain = CPU_MASK_ALL, .vector = IRQ0_VECTOR, },
+- [1] = { .domain = CPU_MASK_ALL, .vector = IRQ1_VECTOR, },
+- [2] = { .domain = CPU_MASK_ALL, .vector = IRQ2_VECTOR, },
+- [3] = { .domain = CPU_MASK_ALL, .vector = IRQ3_VECTOR, },
+- [4] = { .domain = CPU_MASK_ALL, .vector = IRQ4_VECTOR, },
+- [5] = { .domain = CPU_MASK_ALL, .vector = IRQ5_VECTOR, },
+- [6] = { .domain = CPU_MASK_ALL, .vector = IRQ6_VECTOR, },
+- [7] = { .domain = CPU_MASK_ALL, .vector = IRQ7_VECTOR, },
+- [8] = { .domain = CPU_MASK_ALL, .vector = IRQ8_VECTOR, },
+- [9] = { .domain = CPU_MASK_ALL, .vector = IRQ9_VECTOR, },
+- [10] = { .domain = CPU_MASK_ALL, .vector = IRQ10_VECTOR, },
+- [11] = { .domain = CPU_MASK_ALL, .vector = IRQ11_VECTOR, },
+- [12] = { .domain = CPU_MASK_ALL, .vector = IRQ12_VECTOR, },
+- [13] = { .domain = CPU_MASK_ALL, .vector = IRQ13_VECTOR, },
+- [14] = { .domain = CPU_MASK_ALL, .vector = IRQ14_VECTOR, },
+- [15] = { .domain = CPU_MASK_ALL, .vector = IRQ15_VECTOR, },
++ irq_cfg_element(0, IRQ0_VECTOR),
++ irq_cfg_element(1, IRQ1_VECTOR),
++ irq_cfg_element(2, IRQ2_VECTOR),
++ irq_cfg_element(3, IRQ3_VECTOR),
++ irq_cfg_element(4, IRQ4_VECTOR),
++ irq_cfg_element(5, IRQ5_VECTOR),
++ irq_cfg_element(6, IRQ6_VECTOR),
++ irq_cfg_element(7, IRQ7_VECTOR),
++ irq_cfg_element(8, IRQ8_VECTOR),
++ irq_cfg_element(9, IRQ9_VECTOR),
++ irq_cfg_element(10, IRQ10_VECTOR),
++ irq_cfg_element(11, IRQ11_VECTOR),
++ irq_cfg_element(12, IRQ12_VECTOR),
++ irq_cfg_element(13, IRQ13_VECTOR),
++ irq_cfg_element(14, IRQ14_VECTOR),
++ irq_cfg_element(15, IRQ15_VECTOR),
+ };
+
+ static int assign_irq_vector(int irq, cpumask_t mask);