Merge tag 'powerpc-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux.git] / arch / powerpc / include / asm / archrandom.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_ARCHRANDOM_H
3 #define _ASM_POWERPC_ARCHRANDOM_H
4
5 #include <asm/machdep.h>
6
7 static inline size_t __must_check arch_get_random_longs(unsigned long *v, size_t max_longs)
8 {
9         return 0;
10 }
11
12 static inline size_t __must_check arch_get_random_seed_longs(unsigned long *v, size_t max_longs)
13 {
14         if (max_longs && ppc_md.get_random_seed && ppc_md.get_random_seed(v))
15                 return 1;
16         return 0;
17 }
18
19 #ifdef CONFIG_PPC_POWERNV
20 int pnv_get_random_long(unsigned long *v);
21 #endif
22
23 #endif /* _ASM_POWERPC_ARCHRANDOM_H */