]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: context: Fix ASID limit in boot messages
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Thu, 27 Feb 2020 08:34:47 +0000 (09:34 +0100)
committerWill Deacon <will@kernel.org>
Mon, 2 Mar 2020 12:10:38 +0000 (12:10 +0000)
commit35d555bbcff93609d0a0966a7e681627c4e2c08e
treea28cd22425a5ecb8c68df9aec0ff08c26c041c91
parent99d7f2b8b930776b379d19f7b2dafc85c06c7a32
arm64: context: Fix ASID limit in boot messages

Since commit 37764792c087 ("arm64: context: Free up kernel ASIDs if KPTI
is not in use"), the NUM_USER_ASIDS macro doesn't correspond to the
effective number of ASIDs when KPTI is enabled. Get an accurate number
of available ASIDs in an arch_initcall, once we've discovered all CPUs'
capabilities and know if we still need to halve the ASID space for KPTI.

Fixes: 37764792c087 ("arm64: context: Free up kernel ASIDs if KPTI is not in use")
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/mm/context.c