x86: max_low_pfn_mapped fix #4
authorYinghai Lu <yhlu.kernel@gmail.com>
Sun, 13 Jul 2008 21:29:41 +0000 (14:29 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 14 Jul 2008 07:24:16 +0000 (09:24 +0200)
only add direct mapping for aperture

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>
arch/x86/kernel/pci-gart_64.c

index a614ee10f8468ab8411955105b94d1dc858f90e2..c3fe78406d1897b40e380f0528cf4db832d0a191 100644 (file)
@@ -679,11 +679,8 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
        /* need to map that range */
        end_pfn = (aper_base>>PAGE_SHIFT) + (aper_size>>PAGE_SHIFT);
        if (end_pfn > max_low_pfn_mapped) {
-               start_pfn = max_low_pfn_mapped;
-               max_low_pfn_mapped = init_memory_mapping(start_pfn<<PAGE_SHIFT,
-                                                        end_pfn<<PAGE_SHIFT);
-               if (max_pfn_mapped < max_low_pfn_mapped)
-                       max_pfn_mapped = max_low_pfn_mapped;
+               start_pfn = (aper_base>>PAGE_SHIFT);
+               init_memory_mapping(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT);
        }
        return 0;