arm64: pgtable: use a single bit for PTE_WRITE regardless of DBM
authorWill Deacon <will.deacon@arm.com>
Fri, 11 Sep 2015 17:22:02 +0000 (18:22 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 14 Sep 2015 11:28:45 +0000 (12:28 +0100)
commitbf950040a53da35522e38066d9eb6ab7a1c9d136
treec525e4411e969a2c070de72337a96c17775870f6
parent62d96c71d248834af2891293dc23cc344ae2ec36
arm64: pgtable: use a single bit for PTE_WRITE regardless of DBM

Depending on CONFIG_ARM64_HW_AFDBM, we use either bit 57 or 51 of the
pte to represent PTE_WRITE. Given that bit 51 is reserved prior to
ARMv8.1, we can just use that bit regardless of the config option. That
also matches what happens if a kernel configured with ARM64_HW_AFDBM=y
is run on a CPU without the DBM functionality.

Cc: Julien Grall <julien.grall@citrix.com>
Tested-by: Julien Grall <julien.grall@citrix.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/pgtable.h