Thread (7 messages) 7 messages, 4 authors, 2017-08-04

Re: [PATCH v2] powerpc/powernv: Use darn instr for random_seed on p9

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-07-13 02:44:10

Matt Brown [off-list ref] writes:
On Tue, Jul 11, 2017 at 7:34 PM, Daniel Axtens [off-list ref] wrote:
quoted
quoted
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help