[PATCH] x86: Allow percpu variables to be page-aligned
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / sparc64 / kernel / smp.c
index d4f0a70..1fac215 100644 (file)
@@ -1343,11 +1343,11 @@ void __init setup_per_cpu_areas(void)
        /* Copy section for each CPU (we discard the original) */
        goal = PERCPU_ENOUGH_ROOM;
 
-       __per_cpu_shift = 0;
-       for (size = 1UL; size < goal; size <<= 1UL)
+       __per_cpu_shift = PAGE_SHIFT;
+       for (size = PAGE_SIZE; size < goal; size <<= 1UL)
                __per_cpu_shift++;
 
-       ptr = alloc_bootmem(size * NR_CPUS);
+       ptr = alloc_bootmem_pages(size * NR_CPUS);
 
        __per_cpu_base = ptr - __per_cpu_start;