Re: [PATCH] hwrng: ks-sa: Add minimum sleep time before ready-polling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 15, 2019 at 02:06:10PM +0800, Herbert Xu wrote:
> On Wed, Nov 06, 2019 at 09:30:49AM +0000, Sverdlin, Alexander (Nokia - DE/Ulm) wrote:
> > From: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxx>
> > 
> > Current polling timeout is 25 us. The hardware is currently configured to
> > harvest the entropy for 81920 us. This leads to timeouts even during
> > blocking read (wait=1).
> > 
> > Log snippet:
> > [    5.727589] [<c040ffcc>] (ks_sa_rng_probe) from [<c04181e8>] (platform_drv_probe+0x58/0xb4)
> > ...
> > [    5.727805] hwrng: no data available
> > ...
> > [   13.157016] random: systemd: uninitialized urandom read (16 bytes read)
> > [   13.157033] systemd[1]: Initializing machine ID from random generator.
> > ...
> > [   15.848770] random: fast init done
> > ...
> > [   15.848807] random: crng init done
> > 
> > After the patch:
> > [    6.223534] random: systemd: uninitialized urandom read (16 bytes read)
> > [    6.223551] systemd[1]: Initializing machine ID from random generator.
> > ...
> > [    6.876075] random: fast init done
> > ...
> > [    6.954200] random: systemd: uninitialized urandom read (16 bytes read)
> > [    6.955244] random: systemd: uninitialized urandom read (16 bytes read)
> > ...
> > [    7.121948] random: crng init done
> > 
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxx>
> > ---
> >  drivers/char/hw_random/ks-sa-rng.c | 38 ++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> 
> Patch applied.  Thanks.

This is causing a build error.  Seems that a line of the patch in
ks_sa_rng_init() went missing when it was applied...?

drivers/char/hw_random/ks-sa-rng.c: In function 'ks_sa_rng_init':
drivers/char/hw_random/ks-sa-rng.c:146:47: error: 'clk_rate' undeclared (first use in this function)
  146 |  ks_sa_rng->refill_delay_ns = refill_delay_ns(clk_rate);
      |                                               ^~~~~~~~
drivers/char/hw_random/ks-sa-rng.c:146:47: note: each undeclared identifier is reported only once for each function it appears in



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux