• R
    hwrng: timeriomem - Improve performance for sub-jiffie update periods · ca3bff70
    Rick Altherr 提交于
    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.
    Signed-off-by: NRick Altherr <raltherr@google.com>
    Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
    ca3bff70
timeriomem-rng.c 5.5 KB