Skip to content

Commit

Permalink
hwrng: omap - Set default quality
Browse files Browse the repository at this point in the history
Newer combinations of the glibc, kernel and openssh can result in long initial
startup times on OMAP devices:

[    6.671425] systemd-rc-once[102]: Creating ED25519 key; this may take some time ...
[  142.652491] systemd-rc-once[102]: Creating ED25519 key; done.

due to the blocking getrandom(2) system call:

[  142.610335] random: crng init done

Set the quality level for the omap hwrng driver allowing the kernel to use the
hwrng as an entropy source at boot.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Emantor authored and herbertx committed Mar 22, 2019
1 parent f808aa3 commit 62f95ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/hw_random/omap-rng.c
Expand Up @@ -443,6 +443,7 @@ static int omap_rng_probe(struct platform_device *pdev)
priv->rng.read = omap_rng_do_read;
priv->rng.init = omap_rng_init;
priv->rng.cleanup = omap_rng_cleanup;
priv->rng.quality = 900;

priv->rng.priv = (unsigned long)priv;
platform_set_drvdata(pdev, priv);
Expand Down

0 comments on commit 62f95ae

Please sign in to comment.