]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: add runtime system sanity checks
authorMark Rutland <mark.rutland@arm.com>
Wed, 16 Jul 2014 15:32:46 +0000 (16:32 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 18 Jul 2014 14:24:11 +0000 (15:24 +0100)
commitffb91170a6643803a63f88a4bbcb4ccdd716a6b1
tree66f405041d7673f64cf9c7c1139ff8d2e8f6d043
parent7e0c16dc3f0934230123f284728e19904c73ea90
arm64: add runtime system sanity checks

Unexpected variation in certain system register values across CPUs is an
indicator of potential problems with a system. The kernel expects CPUs
to be mostly identical in terms of supported features, even in systems
with heterogeneous CPUs, with uniform instruction set support being
critical for the correct operation of userspace.

To help detect issues early where hardware violates the expectations of
the kernel, this patch adds simple runtime sanity checks on important ID
registers in the bring up path of each CPU.

Where CPUs are fundamentally mismatched, set TAINT_CPU_OUT_OF_SPEC.
Given that the kernel assumes CPUs are identical feature wise, let's not
pretend that we expect such configurations to work. Supporting such
configurations would require massive rework, and hopefully they will
never exist.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/cpuinfo.c