aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-05 00:25:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-05 00:25:28 -0400
commitd1d9cfc330e2622f4b4e0b82d3b41a34619614d4 (patch)
tree70cca8005b1ff0c6b114f2ad296106d700ff35b0 /arch/powerpc/include/asm
parentcda540ace6a194850e23c79955cc2e46fd91c19a (diff)
parent7b878d4b48c4e04b936918bb83836a107ba453b3 (diff)
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull /dev/random changes from Ted Ts'o: "A number of cleanups plus support for the RDSEED instruction, which will be showing up in Intel Broadwell CPU's" * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: Add arch_has_random[_seed]() random: If we have arch_get_random_seed*(), try it before blocking random: Use arch_get_random_seed*() at init time and once a second x86, random: Enable the RDSEED instruction random: use the architectural HWRNG for the SHA's IV in extract_buf() random: clarify bits/bytes in wakeup thresholds random: entropy_bytes is actually bits random: simplify accounting code random: tighten bound on random_read_wakeup_thresh random: forget lock in lockless accounting random: simplify accounting logic random: fix comment on "account" random: simplify loop in random_read random: fix description of get_random_bytes random: fix comment on proc_do_uuid random: fix typos / spelling errors in comments
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/archrandom.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/archrandom.h b/arch/powerpc/include/asm/archrandom.h
index d853d163ba47..bde531103638 100644
--- a/arch/powerpc/include/asm/archrandom.h
+++ b/arch/powerpc/include/asm/archrandom.h
@@ -25,8 +25,26 @@ static inline int arch_get_random_int(unsigned int *v)
25 return rc; 25 return rc;
26} 26}
27 27
28static inline int arch_has_random(void)
29{
30 return !!ppc_md.get_random_long;
31}
32
28int powernv_get_random_long(unsigned long *v); 33int powernv_get_random_long(unsigned long *v);
29 34
35static inline int arch_get_random_seed_long(unsigned long *v)
36{
37 return 0;
38}
39static inline int arch_get_random_seed_int(unsigned int *v)
40{
41 return 0;
42}
43static inline int arch_has_random_seed(void)
44{
45 return 0;
46}
47
30#endif /* CONFIG_ARCH_RANDOM */ 48#endif /* CONFIG_ARCH_RANDOM */
31 49
32#endif /* _ASM_POWERPC_ARCHRANDOM_H */ 50#endif /* _ASM_POWERPC_ARCHRANDOM_H */