rpms/kernel-xen-2.6/devel linux-2.6-xen-irq_vector-uninitialize.patch, NONE, 1.1 kernel-xen.spec, 1.46, 1.47

Eduardo Habkost (ehabkost) fedora-extras-commits at redhat.com
Mon Aug 20 20:29:43 UTC 2007


Author: ehabkost

Update of /cvs/pkgs/rpms/kernel-xen-2.6/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5432

Modified Files:
	kernel-xen.spec 
Added Files:
	linux-2.6-xen-irq_vector-uninitialize.patch 
Log Message:
Add linux-2.6-xen-irq_vector-uninitialize.patch

Fix Xen IRQ handling bug that was introduced on the rebase
to 2.6.21. It may fix some problems reported on bug #252301


linux-2.6-xen-irq_vector-uninitialize.patch:

--- NEW FILE linux-2.6-xen-irq_vector-uninitialize.patch ---
# HG changeset patch
# User ehabkost at 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);


Index: kernel-xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/kernel-xen.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- kernel-xen.spec	20 Aug 2007 19:41:21 -0000	1.46
+++ kernel-xen.spec	20 Aug 2007 20:29:10 -0000	1.47
@@ -465,6 +465,7 @@
 Patch952: linux-2.6-xen-x86_64-silence-up-apic-errors.patch
 Patch960: linux-2.6-xen-blkfront-wait-add.patch
 Patch961: linux-2.6-xen-backwards-time.patch
+Patch962: linux-2.6-xen-irq_vector-uninitialize.patch
 
 #
 # Patches 1000 to 5000 are reserved for bugfixes to drivers and filesystems
@@ -947,6 +948,7 @@
 # Xen utrace
 %patch960 -p1
 %patch961 -p1
+%patch962 -p1
 %endif
 
 
@@ -2325,6 +2327,12 @@
 #  - tux.
 
 %changelog
+* Mon Aug 20 2007 Eduardo Habkost <ehabkost at redhat.com>
+- Use %%if %%{includexen} around the xen-specific patches
+- Add linux-2.6-xen-irq_vector-uninitialize.patch:
+  Fix Xen IRQ handling bug that was introduced on the rebase
+  to 2.6.21. It may fix some problems reported on bug #252301
+
 * Thu Aug 09 2007 Eduardo Habkost <ehabkost at redhat.com>
 - Add linux-2.6-xen-backwards-time.patch from linux-2.6.18-xen.hg
   changeset 87bb8705768a. This should fix bug #236307




More information about the fedora-extras-commits mailing list