diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2013-04-30 16:26:08 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-05-01 20:37:37 -0400 |
commit | 54d5999d98f2ab36ad71b9ef4d82cf5f399205f5 (patch) | |
tree | b7d60743f2e270a30e722982072520ec5ee70357 | |
parent | 9353374b8e1585d5fa47a1e5c1d3e9155dd0eb7c (diff) |
powerpc: Fix build error for book3e
We moved the definition of shift_to_mmu_psize and mmu_psize_to_shift
out of hugetlbpage.c in patch "powerpc: New hugepage directory format".
These functions are not related to hugetlbpage and we want to use them
outside hugetlbpage.c We missed a definition for book3e when we moved
these functions. Add similar functions to mmu-book3e.h
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/include/asm/mmu-book3e.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h index 8bd560c5fe84..936db360790a 100644 --- a/arch/powerpc/include/asm/mmu-book3e.h +++ b/arch/powerpc/include/asm/mmu-book3e.h | |||
@@ -215,6 +215,7 @@ | |||
215 | #define TLBILX_T_CLASS3 7 | 215 | #define TLBILX_T_CLASS3 7 |
216 | 216 | ||
217 | #ifndef __ASSEMBLY__ | 217 | #ifndef __ASSEMBLY__ |
218 | #include <asm/bug.h> | ||
218 | 219 | ||
219 | extern unsigned int tlbcam_index; | 220 | extern unsigned int tlbcam_index; |
220 | 221 | ||
@@ -254,6 +255,23 @@ struct mmu_psize_def | |||
254 | }; | 255 | }; |
255 | extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; | 256 | extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; |
256 | 257 | ||
258 | static inline int shift_to_mmu_psize(unsigned int shift) | ||
259 | { | ||
260 | int psize; | ||
261 | |||
262 | for (psize = 0; psize < MMU_PAGE_COUNT; ++psize) | ||
263 | if (mmu_psize_defs[psize].shift == shift) | ||
264 | return psize; | ||
265 | return -1; | ||
266 | } | ||
267 | |||
268 | static inline unsigned int mmu_psize_to_shift(unsigned int mmu_psize) | ||
269 | { | ||
270 | if (mmu_psize_defs[mmu_psize].shift) | ||
271 | return mmu_psize_defs[mmu_psize].shift; | ||
272 | BUG(); | ||
273 | } | ||
274 | |||
257 | /* The page sizes use the same names as 64-bit hash but are | 275 | /* The page sizes use the same names as 64-bit hash but are |
258 | * constants | 276 | * constants |
259 | */ | 277 | */ |