Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull /dev/random changes from Ted Ts'o: "These patches are designed to enable improvements to /dev/random for non-x86 platforms, in particular MIPS and ARM" * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: allow architectures to optionally define random_get_entropy() random: run random_int_secret_init() run after all late_initcalls
This commit is contained in:
@@ -64,6 +64,20 @@
|
||||
|
||||
#include <asm/timex.h>
|
||||
|
||||
#ifndef random_get_entropy
|
||||
/*
|
||||
* The random_get_entropy() function is used by the /dev/random driver
|
||||
* in order to extract entropy via the relative unpredictability of
|
||||
* when an interrupt takes places versus a high speed, fine-grained
|
||||
* timing source or cycle counter. Since it will be occurred on every
|
||||
* single interrupt, it must have a very low cost/overhead.
|
||||
*
|
||||
* By default we use get_cycles() for this purpose, but individual
|
||||
* architectures may override this in their asm/timex.h header file.
|
||||
*/
|
||||
#define random_get_entropy() get_cycles()
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SHIFT_PLL is used as a dampening factor to define how much we
|
||||
* adjust the frequency correction for a given offset in PLL mode.
|
||||
|
Reference in New Issue
Block a user