aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mm/proc-v7-3level.S
diff options
context:
space:
mode:
authorSteven Capper <steve.capper@linaro.org>2014-07-18 16:15:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-05 22:35:39 -0800
commit5012ebf4bc33c18cd63f7ea62b85c38e64b811ac (patch)
tree2ba76abb8ee4625421651a0f27ccc1c7b3b9a8f6 /arch/arm/mm/proc-v7-3level.S
parent36e2738b5ef615f4092f930577438b5f15e7491f (diff)
ARM: 8108/1: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear
commit f2950706871c4b6e8c0f0d7c3f62d35930b8de63 upstream. 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> [hpy: Backported to 3.10: - adjust the context - ignore change to pmd, because 3.10 does not support HugePage.] Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/mm/proc-v7-3level.S')
0 files changed, 0 insertions, 0 deletions