From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V5 1/2] arm: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear
Date: Fri, 27 Jun 2014 13:34:34 +0100 [thread overview]
Message-ID: <20140627123433.GO26276@arm.com> (raw)
In-Reply-To: <20140627122359.GA30585@linaro.org>
On Fri, Jun 27, 2014 at 01:24:00PM +0100, Steve Capper wrote:
> On Fri, Jun 27, 2014 at 12:24:20PM +0100, Will Deacon wrote:
> > On Tue, Jun 24, 2014 at 01:23:23PM +0100, Steve Capper wrote:
> > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> > > -#define pmd_trans_huge(pmd) (pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT))
> > > -#define pmd_trans_splitting(pmd) (pmd_val(pmd) & PMD_SECT_SPLITTING)
> > > +#define pmd_trans_huge(pmd) (pmd_val(pmd) && pmd_isclear((pmd), PMD_TABLE_BIT))
> >
> > Why isn't this just pmd_present(pmd) && !pmd_table(pmd)? Put another way, I
> > see to have forgotten why we need PMD_TABLE_BIT instead of just using
> > pmd_table and pmd_sect to work out whether we have a table or a block.
> >
>
> If we use pmd_sect, we are testing for block entries, but THPs are allowed to
> be faulting entries (i.e. PROT_NONE). A non-zero pmd that does not have the
> table bit set can safely be assumed to be a PROT_NONE THP.
Ah yes, I forgot about faulting entries. We should still be able to use
pmd_table(pmd) as opposed to PMD_TABLE_BIT though, right?
Will
next prev parent reply other threads:[~2014-06-27 12:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 12:23 [PATCH V5 0/2] PTE fixes for ARM LPAE Steve Capper
2014-06-24 12:23 ` [PATCH V5 1/2] arm: mm: Introduce {pte, pmd}_isset and {pte, pmd}_isclear Steve Capper
2014-06-27 11:24 ` [PATCH V5 1/2] arm: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear Will Deacon
2014-06-27 12:24 ` Steve Capper
2014-06-27 12:34 ` Will Deacon [this message]
2014-06-27 12:48 ` Steve Capper
2014-06-24 12:23 ` [PATCH V5 2/2] arm: mm: Modify pte_write and pmd_write logic for LPAE Steve Capper
2014-06-27 11:39 ` Will Deacon
2014-06-27 12:42 ` Steve Capper
2014-06-27 12:47 ` Will Deacon
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=20140627123433.GO26276@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.