OSDN Git Service

target-ppc: Split out SREGS get/put functions
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 9 Mar 2016 00:58:33 +0000 (11:58 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 15 Mar 2016 22:55:05 +0000 (09:55 +1100)
commita7a00a729a98e41501904dd26e8535571b3e9579
tree10d1bcbb70b5b32fc7e38519e5ce0af44c6d210d
parent788d2599def0e26d92802593b07ec76e8701ccce
target-ppc: Split out SREGS get/put functions

Currently the getting and setting of Power MMU registers (sregs) take up
large inline chunks of the kvm_arch_get_registers() and
kvm_arch_put_registers() functions.  Especially since there are two
variants (for Book-E and Book-S CPUs), only one of which will be used in
practice, this is pretty hard to read.

This patch splits these out into helper functions for clarity.  No
functional change is expected.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
target-ppc/kvm.c