From: Will Deacon Date: Thu, 4 Jan 2024 12:28:46 +0000 (+0000) Subject: Merge branch 'for-next/fixes' into for-next/core X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=db32cf8e280b46726065c518e90761bb0229bacf;p=linux.git Merge branch 'for-next/fixes' into for-next/core Merge in arm64 fixes queued for 6.7 so that kpti_install_ng_mappings() can be updated to use arm64_kernel_unmapped_at_el0() instead of checking the ARM64_UNMAP_KERNEL_AT_EL0 CPU capability directly. * for-next/fixes: arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify perf/arm-cmn: Fail DTC counter allocation correctly arm64: Avoid enabling KPTI unnecessarily --- db32cf8e280b46726065c518e90761bb0229bacf diff --cc arch/arm64/kernel/cpufeature.c index 73b10e64b9dff,91d2d67149691..01a4c1d7fc09a --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@@ -1843,6 -1839,10 +1843,10 @@@ static int __init __kpti_install_ng_map static void __init kpti_install_ng_mappings(void) { + /* Check whether KPTI is going to be used */ - if (!cpus_have_cap(ARM64_UNMAP_KERNEL_AT_EL0)) ++ if (!arm64_kernel_unmapped_at_el0()) + return; + /* * We don't need to rewrite the page-tables if either we've done * it already or we have KASLR enabled and therefore have not