rpms/kernel/F-9 linux-2.6-x86-Reserve-FIRST_DEVICE_VECTOR-in-used_vectors-bit.patch, NONE, 1.1 kernel.spec, 1.792, 1.793
Chuck Ebbert
cebbert at fedoraproject.org
Fri Oct 10 22:31:32 UTC 2008
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14651
Modified Files:
kernel.spec
Added Files:
linux-2.6-x86-Reserve-FIRST_DEVICE_VECTOR-in-used_vectors-bit.patch
Log Message:
x86: Reserve FIRST_DEVICE_VECTOR in used_vectors bitmap.
linux-2.6-x86-Reserve-FIRST_DEVICE_VECTOR-in-used_vectors-bit.patch:
--- NEW FILE linux-2.6-x86-Reserve-FIRST_DEVICE_VECTOR-in-used_vectors-bit.patch ---
>From a272a28f520c58a84853e098b4ee565486ca5062 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader at canonical.com>
Date: Sat, 27 Sep 2008 11:07:30 -0400
Subject: [PATCH] x86: Reserve FIRST_DEVICE_VECTOR in used_vectors bitmap.
Someone from the community found out, that after repeatedly unloading and
loading a device driver that uses MSI IRQs, the system eventually assigned
the vector initially reserved for IRQ0 to the device driver.
The reason for this is, that although IRQ0 is tied to the FIRST_DEVICE_VECTOR
when declaring the irq_vector table, the corresponding bit in the used_vectors
map is not set. So, if vectors are released and assigned often enough, the
vector will get assigned to another interrupt. This happens more often with
MSI interrupts as those are exclusively using a vector.
Fix this by setting the bit for the FIRST_DEVICE_VECTOR in the bitmap.
[Note that this is a special case, as there will be no upstream
commit to tag with Cc: <stable at kernel.org>, because this bug got
eliminated via not backportable means: APIC code unification.]
Acked-by: Ingo Molnar <mingo at elte.hu>
Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
---
arch/x86/kernel/io_apic_32.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index 09cddb5..bfd9fc5 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -2314,6 +2314,9 @@ void __init setup_IO_APIC(void)
for (i = first_system_vector; i < NR_VECTORS; i++)
set_bit(i, used_vectors);
+ /* Mark FIRST_DEVICE_VECTOR which is assigned to IRQ0 as used. */
+ set_bit(FIRST_DEVICE_VECTOR, used_vectors);
+
enable_IO_APIC();
io_apic_irqs = ~PIC_IRQS;
--
1.5.4.3
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.792
retrieving revision 1.793
diff -u -r1.792 -r1.793
--- kernel.spec 10 Oct 2008 22:13:47 -0000 1.792
+++ kernel.spec 10 Oct 2008 22:31:01 -0000 1.793
@@ -609,6 +609,7 @@
Patch101: linux-2.6-x86-check-for-null-irq-context.patch
Patch102: linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.patch
Patch103: linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
+Patch104: linux-2.6-x86-Reserve-FIRST_DEVICE_VECTOR-in-used_vectors-bit.patch
Patch120: linux-2.6-pci-disable-aspm-per-acpi-fadt-setting.patch
Patch121: linux-2.6-pci-disable-aspm-on-pre-1.1-devices.patch
@@ -1094,6 +1095,8 @@
ApplyPatch linux-2.6-x86-improve-up-kernel-when-cpu-hotplug-and-smp.patch
# fix oops in get_wchan()
ApplyPatch linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
+# reserve first device vector on x86-32
+ApplyPatch linux-2.6-x86-Reserve-FIRST_DEVICE_VECTOR-in-used_vectors-bit.patch
# disable ASPM on devices that don't support it
ApplyPatch linux-2.6-pci-disable-aspm-per-acpi-fadt-setting.patch
@@ -1913,6 +1916,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
%changelog
+* Fri Oct 10 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.6-66
+- x86: Reserve FIRST_DEVICE_VECTOR in used_vectors bitmap.
+
* Fri Oct 10 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.6-65
- pci: check range on sysfs mmapped resources
More information about the fedora-extras-commits
mailing list