diff options
author | Rick Altherr <raltherr@google.com> | 2017-04-05 16:21:00 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-04-10 19:17:25 +0800 |
commit | ca3bff70ab320a9132c5524c495455526df4b078 (patch) | |
tree | 822f437139abfa0ab2e3f26a75688ae32a6ece32 /include/asm-generic/device.h | |
parent | 5ab693e63a93c387171b4f7834b2f7bfe9b55f35 (diff) | |
download | linux-ca3bff70ab320a9132c5524c495455526df4b078.tar.gz linux-ca3bff70ab320a9132c5524c495455526df4b078.tar.bz2 linux-ca3bff70ab320a9132c5524c495455526df4b078.zip |
hwrng: timeriomem - Improve performance for sub-jiffie update periods
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: Rick Altherr <raltherr@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/asm-generic/device.h')
0 files changed, 0 insertions, 0 deletions