]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Implement arch_get_random_long/int() for powernv
authorMichael Ellerman <michael@ellerman.id.au>
Fri, 11 Oct 2013 03:07:57 +0000 (14:07 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 11 Oct 2013 05:50:19 +0000 (16:50 +1100)
commitf017f5f493de5dedf5d92ba0ee6dcdf24380552c
tree4a481f28de594306b612938e037dd015114c2fd7
parent9aad7353278ac858dfbedb84eb576c9a2ce81392
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>
arch/powerpc/Kconfig
arch/powerpc/include/asm/archrandom.h [new file with mode: 0644]
arch/powerpc/include/asm/machdep.h
arch/powerpc/platforms/powernv/Kconfig
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/rng.c [new file with mode: 0644]