[PATCH 3/3] powerpc/mm: Speed up computation of base and actual page size for a HPTE
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Mon Sep 5 15:04:16 AEST 2016
> +static void init_hpte_page_sizes(void)
> +{
> + long int ap, bp;
> + long int shift, penc;
> +
> + for (bp = 0; bp < MMU_PAGE_COUNT; ++bp) {
> + if (!mmu_psize_defs[bp].shift)
> + continue; /* not a supported page size */
> + for (ap = bp; ap < MMU_PAGE_COUNT; ++ap) {
> + penc = mmu_psize_defs[bp].penc[ap];
> + if (penc == -1)
> + continue;
> + shift = mmu_psize_defs[ap].shift - LP_SHIFT;
> + if (shift <= 0)
> + continue; /* should never happen */
> + while (penc < (1 << LP_BITS)) {
> + hpte_page_sizes[penc] = (ap << 4) | bp;
> + penc += 1 << shift;
> + }
> + }
> + }
> +}
> +
Going through this again, it is confusing . How are we differentiating
between the below penc values
0000 000z >=8KB (z = 1)
0000 zzzz >=64KB (zzzz = 0001)
Those are made up 'z' values.
-aneesh
More information about the Linuxppc-dev
mailing list