Remove obsolete #include <linux/config.h>
[sfrench/cifs-2.6.git] / arch / ia64 / mm / contig.c
index acaaec4e46811bdf697fdd96bbd37ac9a41dd6b5..2a88cdd6d92493e5e8af300e62daa4e162879491 100644 (file)
@@ -14,7 +14,6 @@
  * Routines used by ia64 machines with contiguous (or virtually contiguous)
  * memory.
  */
-#include <linux/config.h>
 #include <linux/bootmem.h>
 #include <linux/efi.h>
 #include <linux/mm.h>
@@ -97,7 +96,7 @@ find_max_pfn (unsigned long start, unsigned long end, void *arg)
  * Find a place to put the bootmap and return its starting address in
  * bootmap_start.  This address must be page-aligned.
  */
-int
+static int __init
 find_bootmap_location (unsigned long start, unsigned long end, void *arg)
 {
        unsigned long needed = *(unsigned long *)arg;
@@ -141,7 +140,7 @@ find_bootmap_location (unsigned long start, unsigned long end, void *arg)
  * Walk the EFI memory map and find usable memory for the system, taking
  * into account reserved areas.
  */
-void
+void __init
 find_memory (void)
 {
        unsigned long bootmap_size;
@@ -176,18 +175,20 @@ find_memory (void)
  *
  * Allocate and setup per-cpu data areas.
  */
-void *
+void * __cpuinit
 per_cpu_init (void)
 {
        void *cpu_data;
        int cpu;
+       static int first_time=1;
 
        /*
         * get_free_pages() cannot be used before cpu_init() done.  BSP
         * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls
         * get_zeroed_page().
         */
-       if (smp_processor_id() == 0) {
+       if (first_time) {
+               first_time=0;
                cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS,
                                           PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
                for (cpu = 0; cpu < NR_CPUS; cpu++) {
@@ -226,7 +227,7 @@ count_dma_pages (u64 start, u64 end, void *arg)
  * Set up the page tables.
  */
 
-void
+void __init
 paging_init (void)
 {
        unsigned long max_dma;