m68k: Add infrastructure for machine-specific random_get_entropy()
On m68k, get_cycles() (the default implementation for random_get_entropy())
always returns zero, providing no entropy for the random driver.
Add a hook where platforms can provide their own implementation, and wire
it up in the infrastructure provided by commit
61875f30da
("random: allow architectures to
optionally define random_get_entropy()").
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
7a15dd5c4b
commit
017cecee99
|
@ -28,4 +28,14 @@ static inline cycles_t get_cycles(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern unsigned long (*mach_random_get_entropy)(void);
|
||||||
|
|
||||||
|
static inline unsigned long random_get_entropy(void)
|
||||||
|
{
|
||||||
|
if (mach_random_get_entropy)
|
||||||
|
return mach_random_get_entropy();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#define random_get_entropy random_get_entropy
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
#include <linux/timex.h>
|
#include <linux/timex.h>
|
||||||
#include <linux/profile.h>
|
#include <linux/profile.h>
|
||||||
|
|
||||||
|
|
||||||
|
unsigned long (*mach_random_get_entropy)(void);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* timer_interrupt() needs to keep up the real-time clock,
|
* timer_interrupt() needs to keep up the real-time clock,
|
||||||
* as well as call the "xtime_update()" routine every clocktick
|
* as well as call the "xtime_update()" routine every clocktick
|
||||||
|
|
Loading…
Reference in a new issue