x86: replace the now useless max_pfn_mapped define
authorThomas Gleixner <tglx@linutronix.de>
Fri, 21 Mar 2008 20:27:10 +0000 (21:27 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:30 +0000 (17:41 +0200)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/e820_64.c
arch/x86/kernel/setup_64.c
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
include/asm-x86/page.h

index 956b60f3ebd51c505856b0e97622f9add7f2c86e..e277c370246dfb773e5339ca0a54171fdeb175e4 100644 (file)
@@ -115,7 +115,7 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size)
        if (!phys_addr || !size)
                return NULL;
 
-       if (phys_addr+size <= (end_pfn_map << PAGE_SHIFT) + PAGE_SIZE)
+       if (phys_addr+size <= (max_pfn_mapped << PAGE_SHIFT) + PAGE_SIZE)
                return __va(phys_addr);
 
        return NULL;
index d6ada08338762bfc199c71c6b035e1541a0bb445..a720f3d5ed9d3d81da8f816489b12a14096aaff5 100644 (file)
@@ -36,11 +36,11 @@ struct e820map e820;
 unsigned long end_pfn;
 
 /*
- * end_pfn only includes RAM, while end_pfn_map includes all e820 entries.
- * The direct mapping extends to end_pfn_map, so that we can directly access
+ * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
+ * The direct mapping extends to max_pfn_mapped, so that we can directly access
  * apertures, ACPI and other tables without having to play with fixmaps.
  */
-unsigned long end_pfn_map;
+unsigned long max_pfn_mapped;
 
 /*
  * Last pfn which the user wants to use.
@@ -281,16 +281,16 @@ unsigned long __init e820_end_of_ram(void)
 
        end_pfn = find_max_pfn_with_active_regions();
 
-       if (end_pfn > end_pfn_map)
-               end_pfn_map = end_pfn;
-       if (end_pfn_map > MAXMEM>>PAGE_SHIFT)
-               end_pfn_map = MAXMEM>>PAGE_SHIFT;
+       if (end_pfn > max_pfn_mapped)
+               max_pfn_mapped = end_pfn;
+       if (max_pfn_mapped > MAXMEM>>PAGE_SHIFT)
+               max_pfn_mapped = MAXMEM>>PAGE_SHIFT;
        if (end_pfn > end_user_pfn)
                end_pfn = end_user_pfn;
-       if (end_pfn > end_pfn_map)
-               end_pfn = end_pfn_map;
+       if (end_pfn > max_pfn_mapped)
+               end_pfn = max_pfn_mapped;
 
-       printk(KERN_INFO "end_pfn_map = %lu\n", end_pfn_map);
+       printk(KERN_INFO "max_pfn_mapped = %lu\n", max_pfn_mapped);
        return end_pfn;
 }
 
@@ -366,9 +366,9 @@ static int __init e820_find_active_region(const struct e820entry *ei,
        if (*ei_startpfn >= *ei_endpfn)
                return 0;
 
-       /* Check if end_pfn_map should be updated */
-       if (ei->type != E820_RAM && *ei_endpfn > end_pfn_map)
-               end_pfn_map = *ei_endpfn;
+       /* Check if max_pfn_mapped should be updated */
+       if (ei->type != E820_RAM && *ei_endpfn > max_pfn_mapped)
+               max_pfn_mapped = *ei_endpfn;
 
        /* Skip if map is outside the node */
        if (ei->type != E820_RAM || *ei_endpfn <= start_pfn ||
@@ -759,7 +759,7 @@ static int __init parse_memmap_opt(char *p)
                saved_max_pfn = e820_end_of_ram();
                remove_all_active_ranges();
 #endif
-               end_pfn_map = 0;
+               max_pfn_mapped = 0;
                e820.nr_map = 0;
                userdef = 1;
                return 0;
index c6fe1e4bc7c2afffb2b0fe954ea73ed80ae6d3d5..413b8fc3154510089d38288585c38e5d959709c9 100644 (file)
@@ -347,7 +347,7 @@ void __init setup_arch(char **cmdline_p)
 
        check_efer();
 
-       init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT));
+       init_memory_mapping(0, (max_pfn_mapped << PAGE_SHIFT));
        if (efi_enabled)
                efi_init();
 
index 73dd0601166a0d7b94475c677f9318342414cb05..fc3ace2e88f105e5ba2464d85ab12cc48e782e6f 100644 (file)
@@ -51,7 +51,7 @@
 
 unsigned int __VMALLOC_RESERVE = 128 << 20;
 
-unsigned long end_pfn_map;
+unsigned long max_pfn_mapped;
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 unsigned long highstart_pfn, highend_pfn;
@@ -196,7 +196,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
                                set_pmd(pmd, pfn_pmd(pfn, prot));
 
                                pfn += PTRS_PER_PTE;
-                               end_pfn_map = pfn;
+                               max_pfn_mapped = pfn;
                                continue;
                        }
                        pte = one_page_table_init(pmd);
@@ -211,7 +211,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
 
                                set_pte(pte, pfn_pte(pfn, prot));
                        }
-                       end_pfn_map = pfn;
+                       max_pfn_mapped = pfn;
                }
        }
 }
index 210243e94d841122a82143ff45cc7b8294ac71a7..ef9e9cfb1fc2a39df01dacfbe7f351e3c7032493 100644 (file)
@@ -791,7 +791,7 @@ void __init reserve_bootmem_generic(unsigned long phys, unsigned len)
                 * This can happen with kdump kernels when accessing
                 * firmware tables:
                 */
-               if (pfn < end_pfn_map)
+               if (pfn < max_pfn_mapped)
                        return;
 
                printk(KERN_ERR "reserve_bootmem: illegal reserve %lx %u\n",
index b734939916c441c8597a64abfcdfe4fa217c2488..6724a4bc6b7aee2953bbf65493c35d87939a8063 100644 (file)
 
 #ifdef CONFIG_X86_64
 #include <asm/page_64.h>
-#define max_pfn_mapped         end_pfn_map
 #else
 #include <asm/page_32.h>
-#define max_pfn_mapped         end_pfn_map
 #endif /* CONFIG_X86_64 */
 
 #define PAGE_OFFSET            ((unsigned long)__PAGE_OFFSET)
@@ -50,7 +48,7 @@
 
 extern int page_is_ram(unsigned long pagenr);
 
-extern unsigned long end_pfn_map;
+extern unsigned long max_pfn_mapped;
 
 struct page;