diff options
author | Andi Kleen <ak@suse.de> | 2006-01-11 22:44:27 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 19:04:54 -0800 |
commit | ca8642f606ce22de23bae08a5044067f98de855b (patch) | |
tree | 143dd169cbba9d58629ca74d618cbfa41964c2f8 /arch/x86_64/kernel/pci-gart.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/pci-gart.c')
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 2b865c90b041..116e00f1bb7b 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c @@ -804,7 +804,7 @@ static int __init pci_iommu_init(void) } if (no_iommu || - (!force_iommu && end_pfn < 0xffffffff>>PAGE_SHIFT) || + (!force_iommu && (end_pfn-1) < 0xffffffff>>PAGE_SHIFT) || !iommu_aperture || (no_agp && init_k8_gatt(&info) < 0)) { printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); |