[PATCH v1] hw_random: Fix timeriomem_rng for sub-jiffie update periods

Rick Altherr raltherr at google.com
Thu Apr 6 02:22:41 AEST 2017


On Wed, Apr 5, 2017 at 5:57 AM, Herbert Xu <herbert at gondor.apana.org.au>
wrote:

> On Tue, Apr 04, 2017 at 02:43:07PM -0700, Rick Altherr wrote:
> > Some hardware RNGs provide a single register for obtaining random data.
> > Instead of signaling when new data is available, the reader must wait a
> > fixed amount of time between reads for new data to be generated.
> > timeriomem_rng implements this scheme with the period specified in
> > platform data or device tree.  While the period is specified in
> > microseconds, the implementation used a standard timer which has a
> > minimum delay of 1 jiffie and caused a significant bottleneck for
> > devices that can update at 1us.  By switching to an hrtimer, 1us periods
> > now only delay at most 2us per read.
> >
> > Migrated to new hw_random API while I in this driver.
> >
> > Signed-off-by: Rick Altherr <raltherr at google.com>
>
> Thanks Rick.  Could you split this into two patches? One doing
> the API conversion and the other one doing the substantive change
> to the entropy gathering?
>
> That way if there is a problem it'll be easier to track down.
>
>
Will do.


> Thanks,
> --
> Email: Herbert Xu <herbert at gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170405/6ad661eb/attachment.html>


More information about the openbmc mailing list