From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V6 1/2] arm: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear
Date: Thu, 3 Jul 2014 17:01:11 +0100 [thread overview]
Message-ID: <20140703160111.GD14305@arm.com> (raw)
In-Reply-To: <1404389173-4246-2-git-send-email-steve.capper@linaro.org>
On Thu, Jul 03, 2014 at 01:06:12PM +0100, Steve Capper wrote:
> Long descriptors on ARM are 64 bits, and some pte functions such as
> pte_dirty return a bitwise-and of a flag with the pte value. If the
> flag to be tested resides in the upper 32 bits of the pte, then we run
> into the danger of the result being dropped if downcast.
>
> For example:
> gather_stats(page, md, pte_dirty(*pte), 1);
> where pte_dirty(*pte) is downcast to an int.
>
> This patch introduces a new macro pte_isset which performs the bitwise
> and, then performs a double logical invert (where needed) to ensure
> predictable downcasting. The logical inverse pte_isclear is also
> introduced.
>
> Equivalent pmd functions for Transparent HugePages have also been
> added.
>
> Signed-off-by: Steve Capper <steve.capper@linaro.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Will
next prev parent reply other threads:[~2014-07-03 16:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 12:06 [PATCH V6 0/2] PTE fixes for ARM LPAE Steve Capper
2014-07-03 12:06 ` [PATCH V6 1/2] arm: mm: Introduce {pte, pmd}_isset and {pte, pmd}_isclear Steve Capper
2014-07-03 16:01 ` Will Deacon [this message]
2014-07-03 12:06 ` [PATCH V6 2/2] arm: mm: Modify pte_write and pmd_write logic for LPAE Steve Capper
2014-07-03 12:18 ` Russell King - ARM Linux
2014-07-03 13:47 ` Steve Capper
2014-07-03 15:44 ` [PATCH V7] " Steve Capper
2014-07-03 16:02 ` 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=20140703160111.GD14305@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 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).