Matt Brown <matthew.brown....@gmail.com> writes: > On Tue, Jul 11, 2017 at 7:34 PM, Daniel Axtens <d...@axtens.net> wrote: >>> @@ -67,6 +69,21 @@ int powernv_get_random_real_mode(unsigned long *v) >>> return 1; >>> } >>> >>> +int powernv_get_random_darn(unsigned long *v) >> >> This is only referenced in this file so it should probably be labelled >> as 'static'. >> > > That's true, my thinking was to then use the get_random_darn where the > get_random_long was being used. > Looks like there is only one other caller of it at the moment, > kvmppc_h_random (in arch/powerpc/kvm/book3s_hv_builtin.c). > We may want to change that to get_random_darn.
It needs to use the right one depending on whether it's running on P8 or P9. It should really just use ppc_md.get_random_seed(), except that it can be called in real mode, which means it needs to be more careful. So as usual it's complicated :) cheers