diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-07-12 17:30:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-13 02:19:15 -0400 |
commit | 7ab073b6e0cde1544f4e79fadb75532528af7595 (patch) | |
tree | 05415be8d52a6b4bafdc418ee387d4cb6fa51550 /arch/x86/kernel/pci-gart_64.c | |
parent | ae94b8075a2ed58d2318ef03827b25bc844f844e (diff) |
x86: max_low_pfn_mapped fix, #1
fix crash on Ingo's big box:
calling pci_iommu_init+0x0/0x17
PCI-DMA: Disabling AGP.
PCI-DMA: aperture base @ d0000000 size 65536 KB
PCI-DMA: using GART IOMMU.
PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture
BUG: unable to handle kernel paging request at ffff88000003be88
IP: [<ffffffff8026d377>] __alloc_pages_internal+0xc3/0x3f2
PGD 202063 PUD 206063 PMD 22fc00163 PTE 3b162
Oops: 0000 [1] SMP
and e820 is:
BIOS-e820: 0000000000000000 - 000000000009ac00 (usable)
BIOS-e820: 000000000009ac00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000ca000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000007ff70000 (usable)
BIOS-e820: 000000007ff70000 - 000000007ff86000 (ACPI data)
BIOS-e820: 000000007ff86000 - 0000000080000000 (ACPI NVS)
BIOS-e820: 0000000080000000 - 00000000cfe00000 (usable)
BIOS-e820: 00000000cfe00000 - 00000000d0000000 (reserved)
BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
BIOS-e820: 0000000100000000 - 0000000830000000 (usable)
system has 32 GB RAM installed.
max_low_pfn_mapped is 0xcfe00, and GART aperture is not mapped.
So try to use init_memory_mapping to map that area, because the iommu
thinks that area is ram ...
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/kernel/pci-gart_64.c')
-rw-r--r-- | arch/x86/kernel/pci-gart_64.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index d0d18db5d2a4..a614ee10f846 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -630,6 +630,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info) | |||
630 | struct pci_dev *dev; | 630 | struct pci_dev *dev; |
631 | void *gatt; | 631 | void *gatt; |
632 | int i, error; | 632 | int i, error; |
633 | unsigned long start_pfn, end_pfn; | ||
633 | 634 | ||
634 | printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); | 635 | printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); |
635 | aper_size = aper_base = info->aper_size = 0; | 636 | aper_size = aper_base = info->aper_size = 0; |
@@ -674,6 +675,16 @@ static __init int init_k8_gatt(struct agp_kern_info *info) | |||
674 | 675 | ||
675 | printk(KERN_INFO "PCI-DMA: aperture base @ %x size %u KB\n", | 676 | printk(KERN_INFO "PCI-DMA: aperture base @ %x size %u KB\n", |
676 | aper_base, aper_size>>10); | 677 | aper_base, aper_size>>10); |
678 | |||
679 | /* need to map that range */ | ||
680 | end_pfn = (aper_base>>PAGE_SHIFT) + (aper_size>>PAGE_SHIFT); | ||
681 | if (end_pfn > max_low_pfn_mapped) { | ||
682 | start_pfn = max_low_pfn_mapped; | ||
683 | max_low_pfn_mapped = init_memory_mapping(start_pfn<<PAGE_SHIFT, | ||
684 | end_pfn<<PAGE_SHIFT); | ||
685 | if (max_pfn_mapped < max_low_pfn_mapped) | ||
686 | max_pfn_mapped = max_low_pfn_mapped; | ||
687 | } | ||
677 | return 0; | 688 | return 0; |
678 | 689 | ||
679 | nommu: | 690 | nommu: |