]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs
authorSteve Capper <steve.capper@linaro.org>
Fri, 8 Jul 2016 15:01:13 +0000 (16:01 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 12 Jul 2016 15:09:37 +0000 (16:09 +0100)
commit8fabf6d3c82a44430fe9451ac52e913c2845dd6d
tree0f8222aa38a71ac52a9a43367211f54a6d854011
parent5b8a9f0bfa969d57877d7d520c531f1abcf7a176
arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs

It can be useful for JIT software to be aware of MIDR_EL1 and
REVIDR_EL1 to ascertain the presence of any core errata that could
affect code generation.

This patch exposes these registers through sysfs:

/sys/devices/system/cpu/cpu$ID/regs/identification/midr_el1
/sys/devices/system/cpu/cpu$ID/regs/identification/revidr_el1

where $ID is the cpu number. For big.LITTLE systems, one can have a
mixture of cores (e.g. Cortex A53 and Cortex A57), thus all CPUs need
to be enumerated.

If the kernel does not have valid information to populate these entries
with, an empty string is returned to userspace.

Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Steve Capper <steve.capper@linaro.org>
[suzuki.poulose@arm.com: ABI documentation updates, hotplug notifiers, kobject changes]
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Documentation/ABI/testing/sysfs-devices-system-cpu
arch/arm64/include/asm/cpu.h
arch/arm64/kernel/cpuinfo.c