]> Git Repo - qemu.git/commit
target/ppc: Streamline calculation of RMA limit from LPCR[RMLS]
authorDavid Gibson <[email protected]>
Mon, 6 Jan 2020 05:52:26 +0000 (16:52 +1100)
committerDavid Gibson <[email protected]>
Mon, 16 Mar 2020 22:41:15 +0000 (09:41 +1100)
commita864a6b382d52579210b86cde50bc949d48a3155
tree4222075631ff393c62a3e569ab5215f3944e611a
parente232eccc754b7c61110a21fb029f2946cc968799
target/ppc: Streamline calculation of RMA limit from LPCR[RMLS]

Currently we use a big switch statement in ppc_hash64_update_rmls() to work
out what the right RMA limit is based on the LPCR[RMLS] field.  There's no
formula for this - it's just an arbitrary mapping defined by the existing
CPU implementations - but we can make it a bit more readable by using a
lookup table rather than a switch.  In addition we can use the MiB/GiB
symbols to make it a bit clearer.

While there we add a bit of clarity and rationale to the comment about
what happens if the LPCR[RMLS] doesn't contain a valid value.

Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
target/ppc/mmu-hash64.c
This page took 0.025779 seconds and 4 git commands to generate.