···6363 if (huge) {6464#ifdef CONFIG_HUGETLB_PAGE6565 psize = get_slice_psize(mm, addr);6666+ /* Mask the address for the correct page size */6767+ addr &= ~((1UL << mmu_psize_defs[psize].shift) - 1);6668#else6769 BUG();6870 psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */6971#endif7070- } else7272+ } else {7173 psize = pte_pagesize_index(mm, addr, pte);7474+ /* Mask the address for the standard page size. If we7575+ * have a 64k page kernel, but the hardware does not7676+ * support 64k pages, this might be different from the7777+ * hardware page size encoded in the slice table. */7878+ addr &= PAGE_MASK;7979+ }72807373- /* Mask the address for the correct page size */7474- addr &= ~((1UL << mmu_psize_defs[psize].shift) - 1);75817682 /* Build full vaddr */7783 if (!is_kernel_addr(addr)) {