rpms/kernel/F-9 linux-2.6-x86-early_ioremap-fix-fencepost-error.patch, NONE, 1.1 linux-2.6-x86-sb450-skip-irq0-override-if-not-routed-to-INT2.patch, NONE, 1.1 TODO, 1.1, 1.2 kernel.spec, 1.796, 1.797

Chuck Ebbert cebbert at fedoraproject.org
Mon Oct 13 20:24:44 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12273

Modified Files:
	TODO kernel.spec 
Added Files:
	linux-2.6-x86-early_ioremap-fix-fencepost-error.patch 
	linux-2.6-x86-sb450-skip-irq0-override-if-not-routed-to-INT2.patch 
Log Message:
x86, early_ioremap: fix fencepost error
x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC

linux-2.6-x86-early_ioremap-fix-fencepost-error.patch:

--- NEW FILE linux-2.6-x86-early_ioremap-fix-fencepost-error.patch ---
From: Alan Cox <alan at redhat.com>
Date: Fri, 10 Oct 2008 09:46:45 +0000 (+0100)
Subject: x86, early_ioremap: fix fencepost error
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fx86%2Flinux-2.6-tip.git;a=commitdiff_plain;h=dd5698f42a5f2b494c3e811598403f105b00f4f2

x86, early_ioremap: fix fencepost error

The x86 implementation of early_ioremap has an off by one error. If we get
an object which ends on the first byte of a page we undermap by one page and
this causes a crash on boot with the ASUS P5QL whose DMI table happens to fit
this alignment.

The size computation is currently

	last_addr = phys_addr + size - 1;
	npages = (PAGE_ALIGN(last_addr) - phys_addr)

(Consider a request for 1 byte at alignment 0...)

Closes #11693

Debugging work by Ian Campbell/Felix Geyer

Signed-off-by: Alan Cox <alan at rehat.com>
Cc: <stable at kernel.org>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index d4b6e6a..d0975fc 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -595,7 +595,7 @@ void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
 	 */
 	offset = phys_addr & ~PAGE_MASK;
 	phys_addr &= PAGE_MASK;
-	size = PAGE_ALIGN(last_addr) - phys_addr;
+	size = PAGE_ALIGN(last_addr + 1) - phys_addr;
 
 	/*
 	 * Mappings have to fit in the FIX_BTMAP area.

linux-2.6-x86-sb450-skip-irq0-override-if-not-routed-to-INT2.patch:

--- NEW FILE linux-2.6-x86-sb450-skip-irq0-override-if-not-routed-to-INT2.patch ---
From: Andreas Herrmann <andreas.herrmann3 at amd.com>
Date: Mon, 6 Oct 2008 22:11:22 +0000 (+0200)
Subject: x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=33fb0e4eb53f16af312f9698f974e2e64af39c12

x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC

On some HP nx6... laptops (e.g. nx6325) BIOS reports an IRQ0 override
but the SB450 chipset is configured such that timer interrupts goe to
INT0 of IOAPIC.

Check IRQ0 routing and if it is routed to INT0 of IOAPIC skip the
timer override.

[ This more generic PCI ID based quirk should alleviate the need for
  dmi_ignore_irq0_timer_override DMI quirks. ]

Signed-off-by: Andreas Herrmann <andreas.herrmann3 at amd.com>
Acked-by: "Maciej W. Rozycki" <macro at linux-mips.org>
Tested-by: Dmitry Torokhov <dtor at mail.ru>
Cc: <stable at kernel.org>
Signed-off-by: Ingo Molnar <mingo at elte.hu>
---

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 4353cf5..6b839b1 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -95,6 +95,52 @@ static void __init nvidia_bugs(int num, int slot, int func)
 
 }
 
+static u32 ati_ixp4x0_rev(int num, int slot, int func)
+{
+	u32 d;
+	u8  b;
+
+	b = read_pci_config_byte(num, slot, func, 0xac);
+	b &= ~(1<<5);
+	write_pci_config_byte(num, slot, func, 0xac, b);
+
+	d = read_pci_config(num, slot, func, 0x70);
+	d |= 1<<8;
+	write_pci_config(num, slot, func, 0x70, d);
+
+	d = read_pci_config(num, slot, func, 0x8);
+	d &= 0xff;
+	return d;
+}
+
+static void __init ati_bugs(int num, int slot, int func)
+{
+#if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC)
+	u32 d;
+	u8  b;
+
+	if (acpi_use_timer_override)
+		return;
+
+	d = ati_ixp4x0_rev(num, slot, func);
+	if (d  < 0x82)
+		acpi_skip_timer_override = 1;
+	else {
+		/* check for IRQ0 interrupt swap */
+		outb(0x72, 0xcd6); b = inb(0xcd7);
+		if (!(b & 0x2))
+			acpi_skip_timer_override = 1;
+	}
+
+	if (acpi_skip_timer_override) {
+		printk(KERN_INFO "SB4X0 revision 0x%x\n", d);
+		printk(KERN_INFO "Ignoring ACPI timer override.\n");
+		printk(KERN_INFO "If you got timer trouble "
+		       "try acpi_use_timer_override\n");
+	}
+#endif
+}
+
 #define QFLAG_APPLY_ONCE 	0x1
 #define QFLAG_APPLIED		0x2
 #define QFLAG_DONE		(QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@ -114,6 +160,8 @@ static struct chipset early_qrk[] __initdata = {
 	  PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs },
 	{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
 	  PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
+	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS,
+	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
 	{}
 };
 


Index: TODO
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/TODO,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TODO	10 Oct 2008 22:42:16 -0000	1.1
+++ TODO	13 Oct 2008 20:24:14 -0000	1.2
@@ -4,7 +4,9 @@
           linux-2.6-cpuidle-3-make-ladder-governor-honor-latency-requirements.patch
 
           linux-2.6-libata-pata_it821x-driver-updates-and-reworking.patch
-Patch677: linux-2.6-libata-lba-28-48-off-by-one-in-ata.h.patch
+Patch675: linux-2.6-libata-lba-28-48-off-by-one-in-ata.h.patch
+Patch676: linux-2.6-libata-always-do-follow-up-SRST-if-requested.patch
+Patch677: linux-2.6-libata-fix-EH-action-overwriting-in-ata_eh_reset.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
@@ -20,17 +22,19 @@
 
 Patch2002: linux-2.6-e1000e-write-protect-nvm.patch
 
+Patch103: linux-2.6-x86-avoid-dereferencing-beyond-stack-THREAD_SIZE.patch
+
 
 ---------------------------------------------------------------------------------
 Submit for -stable after merging:
 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
 
 
 ---------------------------------------------------------------------------------
 Already scheduled for -stable:
           linux-2.6-x86-Reserve-FIRST_DEVICE_VECTOR-in-used_vectors-bit.patch
 Patch423: linux-2.6-dont-allow-splice-to-files-opened-with-o_append.patch
+Patch105: linux-2.6-x86-early_ioremap-fix-fencepost-error.patch
 
 
 ---------------------------------------------------------------------------------


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.796
retrieving revision 1.797
diff -u -r1.796 -r1.797
--- kernel.spec	13 Oct 2008 20:13:05 -0000	1.796
+++ kernel.spec	13 Oct 2008 20:24:14 -0000	1.797
@@ -610,6 +610,8 @@
 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
+Patch105: linux-2.6-x86-early_ioremap-fix-fencepost-error.patch
+Patch106: linux-2.6-x86-sb450-skip-irq0-override-if-not-routed-to-INT2.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
@@ -1104,6 +1106,10 @@
 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
+#
+ApplyPatch linux-2.6-x86-early_ioremap-fix-fencepost-error.patch
+# fix boot on some broken HP notebooks (nx6...)
+ApplyPatch linux-2.6-x86-sb450-skip-irq0-override-if-not-routed-to-INT2.patch
 
 # disable ASPM on devices that don't support it
 ApplyPatch linux-2.6-pci-disable-aspm-per-acpi-fadt-setting.patch
@@ -1930,6 +1936,10 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Mon Oct 13 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.6-70
+- x86, early_ioremap: fix fencepost error
+- x86: SB450: skip IRQ0 override if it is not routed to INT2 of IOAPIC
+
 * Mon Oct 13 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.6-69
 - libata: always do follow-up SRST if hardreset returned -EAGAIN
 - libata: fix EH action overwriting in ata_eh_reset()




More information about the scm-commits mailing list