]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
random: use the arch-specific rng in xfer_secondary_pool
authorTheodore Ts'o <tytso@mit.edu>
Thu, 5 Jul 2012 14:21:01 +0000 (10:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2012 14:52:48 +0000 (07:52 -0700)
commit478fe5fdd419c03f8238df275c23530548a83763
tree64bbf607066366786593a99d382d484dd99e89ff
parentb8570c10637c4e3666b6da473a17fa5484d3b06c
random: use the arch-specific rng in xfer_secondary_pool

commit e6d4947b12e8ad947add1032dd754803c6004824 upstream.

If the CPU supports a hardware random number generator, use it in
xfer_secondary_pool(), where it will significantly improve things and
where we can afford it.

Also, remove the use of the arch-specific rng in
add_timer_randomness(), since the call is significantly slower than
get_cycles(), and we're much better off using it in
xfer_secondary_pool() anyway.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c