1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_ARCHRANDOM_H
3 #define _ASM_POWERPC_ARCHRANDOM_H
5 #ifdef CONFIG_ARCH_RANDOM
7 bool __must_check arch_get_random_seed_long(unsigned long *v);
9 static inline bool __must_check arch_get_random_long(unsigned long *v)
14 static inline bool __must_check arch_get_random_int(unsigned int *v)
20 static inline bool __must_check arch_get_random_seed_int(unsigned int *v)
25 rc = arch_get_random_seed_long(&val);
31 #endif /* CONFIG_ARCH_RANDOM */
33 #ifdef CONFIG_PPC_POWERNV
34 int powernv_hwrng_present(void);
35 int powernv_get_random_long(unsigned long *v);
36 int powernv_get_random_real_mode(unsigned long *v);
38 static inline int powernv_hwrng_present(void) { return 0; }
39 static inline int powernv_get_random_real_mode(unsigned long *v) { return 0; }
42 #endif /* _ASM_POWERPC_ARCHRANDOM_H */