diff options
Diffstat (limited to 'arch/powerpc/mm/slice.c')
-rw-r--r-- | arch/powerpc/mm/slice.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index db44e02e045b..ba5194817f8a 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
@@ -710,9 +710,18 @@ int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, | |||
710 | unsigned long len) | 710 | unsigned long len) |
711 | { | 711 | { |
712 | struct slice_mask mask, available; | 712 | struct slice_mask mask, available; |
713 | unsigned int psize = mm->context.user_psize; | ||
713 | 714 | ||
714 | mask = slice_range_to_mask(addr, len); | 715 | mask = slice_range_to_mask(addr, len); |
715 | available = slice_mask_for_size(mm, mm->context.user_psize); | 716 | available = slice_mask_for_size(mm, psize); |
717 | #ifdef CONFIG_PPC_64K_PAGES | ||
718 | /* We need to account for 4k slices too */ | ||
719 | if (psize == MMU_PAGE_64K) { | ||
720 | struct slice_mask compat_mask; | ||
721 | compat_mask = slice_mask_for_size(mm, MMU_PAGE_4K); | ||
722 | or_mask(available, compat_mask); | ||
723 | } | ||
724 | #endif | ||
716 | 725 | ||
717 | #if 0 /* too verbose */ | 726 | #if 0 /* too verbose */ |
718 | slice_dbg("is_hugepage_only_range(mm=%p, addr=%lx, len=%lx)\n", | 727 | slice_dbg("is_hugepage_only_range(mm=%p, addr=%lx, len=%lx)\n", |