powerpc: Implement arch_get_random_long/int() for powernv
Add the plumbing to implement arch_get_random_long/int(). It didn't seem worth adding an extra ppc_md hook for int, so we reuse the one for long. Add an implementation for powernv based on the hwrng found in power7+ systems. We whiten the output of the hwrng, and the result passes all the dieharder tests. Signed-off-by:Michael Ellerman <michael@ellerman.id.au> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Showing
- arch/powerpc/Kconfig 3 additions, 0 deletionsarch/powerpc/Kconfig
- arch/powerpc/include/asm/archrandom.h 32 additions, 0 deletionsarch/powerpc/include/asm/archrandom.h
- arch/powerpc/include/asm/machdep.h 4 additions, 0 deletionsarch/powerpc/include/asm/machdep.h
- arch/powerpc/platforms/powernv/Kconfig 1 addition, 0 deletionsarch/powerpc/platforms/powernv/Kconfig
- arch/powerpc/platforms/powernv/Makefile 1 addition, 1 deletionarch/powerpc/platforms/powernv/Makefile
- arch/powerpc/platforms/powernv/rng.c 122 additions, 0 deletionsarch/powerpc/platforms/powernv/rng.c
Loading
Please register or sign in to comment