diff options
author | Steven Capper <steve.capper@linaro.org> | 2014-07-18 15:15:27 (GMT) |
---|---|---|
committer | Matthew Weigel <Matthew.Weigel@freescale.com> | 2014-12-11 18:40:31 (GMT) |
commit | 224fa094f4ea670fefe0dde465fab6cbf38be3be (patch) | |
tree | d0f8e0e48b6a775dc00f2ffeaecbcbb84eb4cc68 /include/linux/hwmon-vid.h | |
parent | 98cb61b79ae59f999f8a416c1dd1b3dcbb68d56c (diff) | |
download | linux-fsl-qoriq-224fa094f4ea670fefe0dde465fab6cbf38be3be.tar.xz |
ARM: 8108/1: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear
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>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit f2950706871c4b6e8c0f0d7c3f62d35930b8de63)
Change-Id: I2d17ab87a364a3e839c71fab3f4507e722288daf
Reviewed-on: http://git.am.freescale.net:8181/23332
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Diffstat (limited to 'include/linux/hwmon-vid.h')
0 files changed, 0 insertions, 0 deletions