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: > > + /* 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...