random: allow architectures to optionally define random_get_entropy()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 21 Sep 2013 17:58:22 +0000 (13:58 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 28 Nov 2013 14:02:03 +0000 (14:02 +0000)
commitee698d67a4af1fd37ba5b40733f103a62f223774
tree37238290039918cfdc4765548ae8dd5e026cbcf4
parent52d4f668a2ebb3d33b2ece452d4f3bcec6c87b7d
random: allow architectures to optionally define random_get_entropy()

commit 61875f30daf60305712e25b209ef41ced2635bad upstream.

Allow architectures which have a disabled get_cycles() function to
provide a random_get_entropy() function which provides a fine-grained,
rapidly changing counter that can be used by the /dev/random driver.

For example, an architecture might have a rapidly changing register
used to control random TLB cache eviction, or DRAM refresh that
doesn't meet the requirements of get_cycles(), but which is good
enough for the needs of the random driver.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/char/random.c
include/linux/timex.h