Thread (10 messages) 10 messages, 3 authors, 2020-01-08

Re: [PATCH v8 2/3] arm64: random: Add data to pool from setup_arch()

From: Mark Brown <broonie@kernel.org>
Date: 2020-01-08 17:37:06

On Wed, Jan 08, 2020 at 05:20:41PM +0000, Mark Rutland wrote:
On Tue, Jan 07, 2020 at 06:35:39PM +0000, Mark Brown wrote:
quoted
+	/* Add multiple values to mirror the generic code. */
+	for (i = 0; i < 16; i++)
+		if (__arm64_rndr(&val))
+			add_device_randomness(&val, sizeof(val));
+}
Given the next patch also needs to check the I reckon it is worth
factoring the ID register check into a helper:
/* Used on the boot CPU before the CPU feature framework is up */
static inline bool __init __early_cpu_has_rndr(void)
{
	unsigned long ftr = read_sysreg_s(SYS_ID_AA64ISAR0_EL1);
	return (ftr >> ID_AA64ISAR0_RNDR_SHIFT) & 0xf;
}
There was also some suggestion about making a generic helper that takes
the register and bitfield to look at.

At some point I do also start to question if we're really winning with
all this stuff static inline...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help