]> 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)
commit8c4c0f9f24ae19c0a131ca735a2dcf851f62c24e
tree66f405041d7673f64cf9c7c1139ff8d2e8f6d043
parent504412473c7b67cfcbebaba8a411b27e75d5f9e4
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