diff options
author | Becky Bruce <beckyb@kernel.crashing.org> | 2011-10-10 06:50:43 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-07 00:26:23 -0500 |
commit | a6146888be0aa80ea41c99178d7d2e08efc776b5 (patch) | |
tree | d15def6bf2df312dd39810f18d2837fc9eb823bb /arch/powerpc/include/asm/hugetlb.h | |
parent | d1b9b12811ef079c37fe464f51953746d8b78e2a (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/include/asm/hugetlb.h')
-rw-r--r-- | arch/powerpc/include/asm/hugetlb.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index 273acfad65ae..555044c310b2 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <asm/page.h> | 5 | #include <asm/page.h> |
6 | 6 | ||
7 | extern struct kmem_cache *hugepte_cache; | 7 | extern struct kmem_cache *hugepte_cache; |
8 | extern void __init reserve_hugetlb_gpages(void); | ||
9 | 8 | ||
10 | static inline pte_t *hugepd_page(hugepd_t hpd) | 9 | static inline pte_t *hugepd_page(hugepd_t hpd) |
11 | { | 10 | { |
@@ -153,14 +152,24 @@ static inline void arch_release_hugepage(struct page *page) | |||
153 | } | 152 | } |
154 | 153 | ||
155 | #else /* ! CONFIG_HUGETLB_PAGE */ | 154 | #else /* ! CONFIG_HUGETLB_PAGE */ |
156 | static inline void reserve_hugetlb_gpages(void) | ||
157 | { | ||
158 | pr_err("Cannot reserve gpages without hugetlb enabled\n"); | ||
159 | } | ||
160 | static inline void flush_hugetlb_page(struct vm_area_struct *vma, | 155 | static inline void flush_hugetlb_page(struct vm_area_struct *vma, |
161 | unsigned long vmaddr) | 156 | unsigned long vmaddr) |
162 | { | 157 | { |
163 | } | 158 | } |
159 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
160 | |||
161 | |||
162 | /* | ||
163 | * FSL Book3E platforms require special gpage handling - the gpages | ||
164 | * are reserved early in the boot process by memblock instead of via | ||
165 | * the .dts as on IBM platforms. | ||
166 | */ | ||
167 | #if defined(CONFIG_HUGETLB_PAGE) && defined(CONFIG_PPC_FSL_BOOK3E) | ||
168 | extern void __init reserve_hugetlb_gpages(void); | ||
169 | #else | ||
170 | static inline void reserve_hugetlb_gpages(void) | ||
171 | { | ||
172 | } | ||
164 | #endif | 173 | #endif |
165 | 174 | ||
166 | #endif /* _ASM_POWERPC_HUGETLB_H */ | 175 | #endif /* _ASM_POWERPC_HUGETLB_H */ |