diff options
author | Matt Brown <matthew.brown.dev@gmail.com> | 2017-08-04 11:12:18 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-08-08 19:37:03 +1000 |
commit | e66ca3db5917f4bcad039d3a3df9f1003797c249 (patch) | |
tree | 46b0b0ca669a0be0d4bac2e63ca175f0da703dba /arch/frv/lib | |
parent | 64d0a506fbdd64906f168539bee32ac7dcabb521 (diff) |
powerpc/powernv: Use darn instruction for get_random_seed() on Power9
This adds powernv_get_random_darn() which utilises the darn instruction,
introduced in ISA v3.0/POWER9.
The darn instruction can potentially return an error, which is supported
by the get_random_seed() API, in normal usage if we see an error we just
return that to the caller.
However when detecting whether darn is functional at boot we try up to
10 times, before deciding that darn doesn't work and failing the
registration of get_random_seed(). That way an intermittent failure
at boot doesn't deprive the system of randomness until the next reboot.
Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com>
[mpe: Move init into a function, tweak change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/frv/lib')
0 files changed, 0 insertions, 0 deletions