]> git.proxmox.com Git - mirror_qemu.git/commit - target/ppc/mmu-hash64.c
target/ppc: Avoid taking "env" parameter to mmu-hash64 functions
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 22 Mar 2018 05:49:28 +0000 (16:49 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 27 Apr 2018 08:05:22 +0000 (18:05 +1000)
commit8fe08fac1939815950b74fb7eb17101320450ca7
tree92d7f05e789ef88548a0ff0b813791d9ac7d8a5f
parent644a2c99a90b95957fd56fc3b9f8908ac9e90702
target/ppc: Avoid taking "env" parameter to mmu-hash64 functions

In most cases we prefer to pass a PowerPCCPU rather than the (embedded)
CPUPPCState.

For ppc_hash64_update_{rmls,vrma}() change to take "cpu" instead of "env".
For ppc_hash64_set_{dsi,isi}() remove the redundant "env" parameter.

In theory this makes more work for the functions, but since "cs", "cpu"
and "env" are related by at most constant offsets, the compiler should be
able to optimize out the difference at effectively zero cost.

helper_*() functions are left alone - since they're more closely tied to
the TCG generated code, passing "env" is still the standard there.

While we're there, fix an incorrect indentation.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
target/ppc/mmu-hash64.c
target/ppc/mmu-hash64.h
target/ppc/translate_init.c