aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_64.c
diff options
context:
space:
mode:
authorBecky Bruce <beckyb@kernel.crashing.org>2011-10-10 06:50:43 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-12-07 00:26:23 -0500
commita6146888be0aa80ea41c99178d7d2e08efc776b5 (patch)
treed15def6bf2df312dd39810f18d2837fc9eb823bb /arch/powerpc/kernel/setup_64.c
parentd1b9b12811ef079c37fe464f51953746d8b78e2a (diff)
powerpc: Add gpages reservation code for 64-bit FSL BOOKE
For 64-bit FSL_BOOKE implementations, gigantic pages need to be reserved at boot time by the memblock code based on the command line. This adds the call that handles the reservation, and fixes some code comments. It also removes the previous pr_err when reserve_hugetlb_gpages is called on a system without hugetlb enabled - the way the code is structured, the call is unconditional and the resulting error message spurious and confusing. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r--arch/powerpc/kernel/setup_64.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index fb9bb46e7e88..4cb8f1e9d044 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -35,6 +35,8 @@
35#include <linux/pci.h> 35#include <linux/pci.h>
36#include <linux/lockdep.h> 36#include <linux/lockdep.h>
37#include <linux/memblock.h> 37#include <linux/memblock.h>
38#include <linux/hugetlb.h>
39
38#include <asm/io.h> 40#include <asm/io.h>
39#include <asm/kdump.h> 41#include <asm/kdump.h>
40#include <asm/prom.h> 42#include <asm/prom.h>
@@ -64,6 +66,7 @@
64#include <asm/mmu_context.h> 66#include <asm/mmu_context.h>
65#include <asm/code-patching.h> 67#include <asm/code-patching.h>
66#include <asm/kvm_ppc.h> 68#include <asm/kvm_ppc.h>
69#include <asm/hugetlb.h>
67 70
68#include "setup.h" 71#include "setup.h"
69 72
@@ -217,6 +220,13 @@ void __init early_setup(unsigned long dt_ptr)
217 /* Initialize the hash table or TLB handling */ 220 /* Initialize the hash table or TLB handling */
218 early_init_mmu(); 221 early_init_mmu();
219 222
223 /*
224 * Reserve any gigantic pages requested on the command line.
225 * memblock needs to have been initialized by the time this is
226 * called since this will reserve memory.
227 */
228 reserve_hugetlb_gpages();
229
220 DBG(" <- early_setup()\n"); 230 DBG(" <- early_setup()\n");
221} 231}
222 232