aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/microwatt/rng.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-07-09 19:29:34 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-07-09 19:29:34 +1000
commit7e74dabc3daf0c217cb5e8e849a8f6c02927950f (patch)
tree8620e5d95e732952473eeb764aee17693e4458bd /arch/powerpc/platforms/microwatt/rng.c
parentpowerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers (diff)
parentpowerpc/powernv: delay rng platform device creation until later in boot (diff)
downloadlinux-dev-7e74dabc3daf0c217cb5e8e849a8f6c02927950f.tar.xz
linux-dev-7e74dabc3daf0c217cb5e8e849a8f6c02927950f.zip
Merge branch 'fixes' into next
Merge our fixes branch. In particular this brings in commit 986481618023 ("powerpc/book3e: Fix PUD allocation size in map_kernel_page()") which fixes a build failure in next, because commit 2db2008e6363 ("powerpc/64e: Rewrite p4d_populate() as a static inline function") depends on it.
Diffstat (limited to 'arch/powerpc/platforms/microwatt/rng.c')
-rw-r--r--arch/powerpc/platforms/microwatt/rng.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/microwatt/rng.c b/arch/powerpc/platforms/microwatt/rng.c
index 7bc4d1cbfaf0..8ece87d005c8 100644
--- a/arch/powerpc/platforms/microwatt/rng.c
+++ b/arch/powerpc/platforms/microwatt/rng.c
@@ -11,6 +11,7 @@
#include <asm/archrandom.h>
#include <asm/cputable.h>
#include <asm/machdep.h>
+#include "microwatt.h"
#define DARN_ERR 0xFFFFFFFFFFFFFFFFul
@@ -29,7 +30,7 @@ static int microwatt_get_random_darn(unsigned long *v)
return 1;
}
-static __init int rng_init(void)
+void __init microwatt_rng_init(void)
{
unsigned long val;
int i;
@@ -37,12 +38,7 @@ static __init int rng_init(void)
for (i = 0; i < 10; i++) {
if (microwatt_get_random_darn(&val)) {
ppc_md.get_random_seed = microwatt_get_random_darn;
- return 0;
+ return;
}
}
-
- pr_warn("Unable to use DARN for get_random_seed()\n");
-
- return -EIO;
}
-machine_subsys_initcall(, rng_init);