arm64: mm: Implement arch_wants_old_prefaulted_pte()
authorWill Deacon <will@kernel.org>
Tue, 24 Nov 2020 18:49:26 +0000 (18:49 +0000)
committerWill Deacon <will@kernel.org>
Wed, 20 Jan 2021 14:46:04 +0000 (14:46 +0000)
commit0388f9c7433024ccf3909b3404a745100f006a17
tree0d74c4b9b4829c052f466183d05fb02eca833c14
parent46bdb4277f98e70d0c91f4289897ade533fe9e80
arm64: mm: Implement arch_wants_old_prefaulted_pte()

On CPUs with hardware AF/DBM, initialising prefaulted PTEs as 'old'
improves vmscan behaviour and does not appear to introduce any overhead
elsewhere.

Implement arch_wants_old_prefaulted_pte() to return 'true' if we detect
hardware access flag support at runtime. This can be extended in future
based on MIDR matching if necessary.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/pgtable.h