OSDN Git Service

ppc: Add macros to register hypervisor mode SPRs
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 21 Mar 2016 12:52:32 +0000 (13:52 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 24 Mar 2016 00:17:33 +0000 (11:17 +1100)
commiteb94268e73a379a54326701a0341f2649e222d29
tree942a14d87a812b6a3e8d3d29eeeb048c02559008
parent1488270e822dc497a9bc799c6c49fdca85b9f28b
ppc: Add macros to register hypervisor mode SPRs

The current set of spr_register_* macros only take the user and
supervisor function pointers. To make the transition easy, we
don't change that but we add "_hv" variants that can be used to
register all 3 sets.

To simplify the transition, users of the "old" macro will set the
hypervisor callback to be the same as the supervisor one. The new
registration function only needs to be used for registers that are
either hypervisor only or behave differently in HV mode.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
[clg: fixed else if condition in gen_op_mfspr() ]
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target-ppc/translate.c
target-ppc/translate_init.c