From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Paul Mackerras <paulus@ozlabs.org>, linuxppc-dev@lists.ozlabs.org
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 3/3] powerpc/mm: Speed up computation of base and actual page size for a HPTE
Date: Mon, 05 Sep 2016 10:34:16 +0530 [thread overview]
Message-ID: <877farq6nj.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160902115055.GC12433@fergus.ozlabs.ibm.com>
> +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
next prev parent reply other threads:[~2016-09-05 5:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 11:47 [PATCH 1/3] powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET Paul Mackerras
2016-09-02 11:49 ` [PATCH 2/3] powerpc/mm: Preserve CFAR value on SLB miss caused by access to bogus address Paul Mackerras
2016-09-04 11:30 ` Aneesh Kumar K.V
2016-09-07 5:52 ` Paul Mackerras
2016-09-13 12:16 ` [2/3] " Michael Ellerman
2016-09-02 11:50 ` [PATCH 3/3] powerpc/mm: Speed up computation of base and actual page size for a HPTE Paul Mackerras
2016-09-04 11:16 ` Aneesh Kumar K.V
2016-09-05 5:04 ` Aneesh Kumar K.V [this message]
2016-09-07 5:07 ` Paul Mackerras
2016-09-07 6:17 ` [PATCH v2 " Paul Mackerras
2016-09-08 10:08 ` Paul Mackerras
2016-09-08 10:16 ` Paolo Bonzini
2016-09-12 0:58 ` Paul Mackerras
2016-09-12 3:03 ` Michael Ellerman
2016-09-12 9:45 ` Paolo Bonzini
2016-09-02 12:22 ` [PATCH 1/3] powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET Aneesh Kumar K.V
2016-09-03 9:54 ` Paul Mackerras
2016-09-04 11:31 ` Aneesh Kumar K.V
2016-09-08 9:47 ` [1/3] " Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877farq6nj.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).