diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2012-10-18 07:54:15 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-12-12 10:48:52 -0500 |
commit | 970d032fec3f9687446595ee2569fb70b858a69f (patch) | |
tree | 18fdf6999d82569a14a41021328f459a7f4bbd97 /arch/mips/mm/tlb-r4k.c | |
parent | f65aad41772f6a0022e9763fe06f47604449964c (diff) |
MIPS: Transparent Huge Pages support
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm/tlb-r4k.c')
-rw-r--r-- | arch/mips/mm/tlb-r4k.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 936165d167e1..94ad86d055c5 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -377,6 +377,26 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
377 | EXIT_CRITICAL(flags); | 377 | EXIT_CRITICAL(flags); |
378 | } | 378 | } |
379 | 379 | ||
380 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
381 | |||
382 | int __init has_transparent_hugepage(void) | ||
383 | { | ||
384 | unsigned int mask; | ||
385 | unsigned long flags; | ||
386 | |||
387 | ENTER_CRITICAL(flags); | ||
388 | write_c0_pagemask(PM_HUGE_MASK); | ||
389 | back_to_back_c0_hazard(); | ||
390 | mask = read_c0_pagemask(); | ||
391 | write_c0_pagemask(PM_DEFAULT_MASK); | ||
392 | |||
393 | EXIT_CRITICAL(flags); | ||
394 | |||
395 | return mask == PM_HUGE_MASK; | ||
396 | } | ||
397 | |||
398 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | ||
399 | |||
380 | static int __cpuinitdata ntlb; | 400 | static int __cpuinitdata ntlb; |
381 | static int __init set_ntlb(char *str) | 401 | static int __init set_ntlb(char *str) |
382 | { | 402 | { |