summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/machdep.h
diff options
context:
space:
mode:
authorMichael Ellerman2013-10-11 05:07:57 +0200
committerBenjamin Herrenschmidt2013-10-11 07:50:19 +0200
commita4da0d50b2a00b79390092e6248ca88b7d93c81d (patch)
tree4a481f28de594306b612938e037dd015114c2fd7 /arch/powerpc/include/asm/machdep.h
parenthwrng: Return errors to upper levels in pseries-rng.c (diff)
downloadkernel-qcow2-linux-a4da0d50b2a00b79390092e6248ca88b7d93c81d.tar.gz
kernel-qcow2-linux-a4da0d50b2a00b79390092e6248ca88b7d93c81d.tar.xz
kernel-qcow2-linux-a4da0d50b2a00b79390092e6248ca88b7d93c81d.zip
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>
Diffstat (limited to 'arch/powerpc/include/asm/machdep.h')
-rw-r--r--arch/powerpc/include/asm/machdep.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 8b480901165a..ce6cc2a7b8b9 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -263,6 +263,10 @@ struct machdep_calls {
ssize_t (*cpu_probe)(const char *, size_t);
ssize_t (*cpu_release)(const char *, size_t);
#endif
+
+#ifdef CONFIG_ARCH_RANDOM
+ int (*get_random_long)(unsigned long *v);
+#endif
};
extern void e500_idle(void);