summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/io_apic.c
diff options
context:
space:
mode:
authorAndi Kleen2006-01-11 22:44:27 +0100
committerLinus Torvalds2006-01-12 04:04:54 +0100
commitca8642f606ce22de23bae08a5044067f98de855b (patch)
tree143dd169cbba9d58629ca74d618cbfa41964c2f8 /arch/x86_64/kernel/io_apic.c
parent[PATCH] x86_64: Handle missing local APIC timer interrupts on C3 state (diff)
downloadkernel-qcow2-linux-ca8642f606ce22de23bae08a5044067f98de855b.tar.gz
kernel-qcow2-linux-ca8642f606ce22de23bae08a5044067f98de855b.tar.xz
kernel-qcow2-linux-ca8642f606ce22de23bae08a5044067f98de855b.zip
[PATCH] x86_64: Fix off by one in IOMMU check
Fix off by one when checking if the machine has enougn memory to need IOMMU This caused the IOMMUs to be needlessly enabled for mem=4G Based on a patch from Jon Mason Signed-off-by: jdmason@us.ibm.com Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/io_apic.c')
-rw-r--r--arch/x86_64/kernel/io_apic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index bdc589924b10..83ea86e0633a 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -37,6 +37,7 @@
#include <asm/proto.h>
#include <asm/mach_apic.h>
#include <asm/acpi.h>
+#include <asm/dma.h>
#define __apicdebuginit __init
@@ -281,7 +282,7 @@ void __init check_ioapic(void)
switch (vendor) {
case PCI_VENDOR_ID_VIA:
#ifdef CONFIG_GART_IOMMU
- if ((end_pfn >= (0xffffffff>>PAGE_SHIFT) ||
+ if ((end_pfn > MAX_DMA32_PFN ||
force_iommu) &&
!iommu_aperture_allowed) {
printk(KERN_INFO