OSDN Git Service

arm64: cpufeature: Use IDreg override in __read_sysreg_by_encoding()
authorMarc Zyngier <maz@kernel.org>
Mon, 8 Feb 2021 09:57:20 +0000 (09:57 +0000)
committerWill Deacon <will@kernel.org>
Tue, 9 Feb 2021 13:47:12 +0000 (13:47 +0000)
commitb3341ae0efa235726ad69e53ce83c6a3c445bda8
treea96dc0f125d91656c6db48ed21be255d7a2ecf1f
parent8f266a5d878ad38fbd43e41e22847650f51d4734
arm64: cpufeature: Use IDreg override in __read_sysreg_by_encoding()

__read_sysreg_by_encoding() is used by a bunch of cpufeature helpers,
which should take the feature override into account. Let's do that.

For a good measure (and because we are likely to need to further
down the line), make this helper available to the rest of the
non-modular kernel.

Code that needs to know the *real* features of a CPU can still
use read_sysreg_s(), and find the bare, ugly truth.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: David Brazdil <dbrazdil@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-12-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c