diff options
author | Andi Kleen <ak@suse.de> | 2006-01-11 16:44:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 22:04:54 -0500 |
commit | ca8642f606ce22de23bae08a5044067f98de855b (patch) | |
tree | 143dd169cbba9d58629ca74d618cbfa41964c2f8 /arch/x86_64/kernel/aperture.c | |
parent | d25bf7e5fe73b5b6d2246ab0be08ae35d718456b (diff) |
[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/aperture.c')
-rw-r--r-- | arch/x86_64/kernel/aperture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c index c7f4fdd20f05..e4e2b7d01f89 100644 --- a/arch/x86_64/kernel/aperture.c +++ b/arch/x86_64/kernel/aperture.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/proto.h> | 24 | #include <asm/proto.h> |
25 | #include <asm/pci-direct.h> | 25 | #include <asm/pci-direct.h> |
26 | #include <asm/dma.h> | ||
26 | 27 | ||
27 | int iommu_aperture; | 28 | int iommu_aperture; |
28 | int iommu_aperture_disabled __initdata = 0; | 29 | int iommu_aperture_disabled __initdata = 0; |
@@ -247,7 +248,7 @@ void __init iommu_hole_init(void) | |||
247 | /* Got the aperture from the AGP bridge */ | 248 | /* Got the aperture from the AGP bridge */ |
248 | } else if (swiotlb && !valid_agp) { | 249 | } else if (swiotlb && !valid_agp) { |
249 | /* Do nothing */ | 250 | /* Do nothing */ |
250 | } else if ((!no_iommu && end_pfn >= 0xffffffff>>PAGE_SHIFT) || | 251 | } else if ((!no_iommu && end_pfn >= MAX_DMA32_PFN) || |
251 | force_iommu || | 252 | force_iommu || |
252 | valid_agp || | 253 | valid_agp || |
253 | fallback_aper_force) { | 254 | fallback_aper_force) { |