Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux/fpc-iii.git] / arch / powerpc / include / asm / archrandom.h
blobd853d163ba4730ddac3eff5793f5f4fe8861a330
1 #ifndef _ASM_POWERPC_ARCHRANDOM_H
2 #define _ASM_POWERPC_ARCHRANDOM_H
4 #ifdef CONFIG_ARCH_RANDOM
6 #include <asm/machdep.h>
8 static inline int arch_get_random_long(unsigned long *v)
10 if (ppc_md.get_random_long)
11 return ppc_md.get_random_long(v);
13 return 0;
16 static inline int arch_get_random_int(unsigned int *v)
18 unsigned long val;
19 int rc;
21 rc = arch_get_random_long(&val);
22 if (rc)
23 *v = val;
25 return rc;
28 int powernv_get_random_long(unsigned long *v);
30 #endif /* CONFIG_ARCH_RANDOM */
32 #endif /* _ASM_POWERPC_ARCHRANDOM_H */