[PATCH] initialize end of memory variables as early as possible
[pandora-kernel.git] / arch / x86_64 / mm / init.c
index 95bd232..d40134b 100644 (file)
@@ -6,7 +6,6 @@
  *  Copyright (C) 2002,2003 Andi Kleen <ak@suse.de>
  */
 
-#include <linux/config.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -598,12 +597,6 @@ void __init mem_init(void)
 
        pci_iommu_alloc();
 
-       /* How many end-of-memory variables you have, grandma! */
-       max_low_pfn = end_pfn;
-       max_pfn = end_pfn;
-       num_physpages = end_pfn;
-       high_memory = (void *) __va(end_pfn * PAGE_SIZE);
-
        /* clear the zero-page */
        memset(empty_zero_page, 0, PAGE_SIZE);
 
@@ -679,16 +672,15 @@ void free_initmem(void)
 
 #ifdef CONFIG_DEBUG_RODATA
 
-extern char __start_rodata, __end_rodata;
 void mark_rodata_ro(void)
 {
-       unsigned long addr = (unsigned long)&__start_rodata;
+       unsigned long addr = (unsigned long)__start_rodata;
 
-       for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE)
+       for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE)
                change_page_attr_addr(addr, 1, PAGE_KERNEL_RO);
 
        printk ("Write protecting the kernel read-only data: %luk\n",
-                       (&__end_rodata - &__start_rodata) >> 10);
+                       (__end_rodata - __start_rodata) >> 10);
 
        /*
         * change_page_attr_addr() requires a global_flush_tlb() call after it.