diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-07-12 14:31:28 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-13 08:19:16 +0200 |
commit | 965194c15dc9e4f3bc44432b39c441c86af7f11d (patch) | |
tree | 0afa32ccb270ff2f506299744c184a4c9ab83c7a /arch/x86/pci/i386.c | |
parent | 7ab073b6e0cde1544f4e79fadb75532528af7595 (diff) | |
download | blackbird-op-linux-965194c15dc9e4f3bc44432b39c441c86af7f11d.tar.gz blackbird-op-linux-965194c15dc9e4f3bc44432b39c441c86af7f11d.zip |
x86: max_low_pfn_mapped fix, #2
tighten the boundary checks around max_low_pfn_mapped - dont overmap
nor undermap into holes.
also print out tseg for AMD cpus, for diagnostic purposes.
(this is an SMM area, and we split up any big mappings around that area)
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/pci/i386.c')
-rw-r--r-- | arch/x86/pci/i386.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 5281e343dd9f..2aafb67dc5f1 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c @@ -334,9 +334,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, flags = new_flags; } - if (((vma->vm_pgoff <= max_low_pfn_mapped) || + if (((vma->vm_pgoff < max_low_pfn_mapped) || (vma->vm_pgoff >= (1UL<<(32 - PAGE_SHIFT)) && - vma->vm_pgoff <= max_pfn_mapped)) && + vma->vm_pgoff < max_pfn_mapped)) && ioremap_change_attr((unsigned long)__va(addr), len, flags)) { free_memtype(addr, addr + len); return -EINVAL; |