Re: [PATCH v10 1/3] arm64: Implement archrandom.h for ARMv8.5-RNG
From: Will Deacon <will@kernel.org>
Date: 2020-01-14 17:44:43
On Fri, Jan 10, 2020 at 12:23:39PM +0000, Mark Brown wrote:
From: Richard Henderson <richard.henderson@linaro.org> Expose the ID_AA64ISAR0.RNDR field to userspace, as the RNG system registers are always available at EL0. Implement arch_get_random_seed_long using RNDR. Given that the TRNG is likely to be a shared resource between cores, and VMs, do not explicitly force re-seeding with RNDRRS. In order to avoid code complexity and potential issues with hetrogenous systems only provide values after cpufeature has finalized the system capabilities. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> [Modified to only function after cpufeature has finalized the system capabilities and move all the code into the header -- broonie] Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Mark Rutland <mark.rutland@arm.com> --- Documentation/arm64/cpu-feature-registers.rst | 2 + arch/arm64/Kconfig | 12 ++++ arch/arm64/include/asm/archrandom.h | 67 +++++++++++++++++++ arch/arm64/include/asm/cpucaps.h | 3 +- arch/arm64/include/asm/sysreg.h | 4 ++ arch/arm64/kernel/cpufeature.c | 13 ++++ 6 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/include/asm/archrandom.h
In which case, should we also add an HWCAP for this? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel