aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/mmu-book3s-v3.h
diff options
context:
space:
mode:
authorBruno Larsen (billionai) <bruno.larsen@eldorado.org.br>2021-07-06 12:03:15 -0300
committerDavid Gibson <david@gibson.dropbear.id.au>2021-07-09 10:38:19 +1000
commita97c4d3c1e55f3098549bc4481f58a91a5834620 (patch)
treefcee508e0e8aba1291dfb88e45cbc0b89db0e3de /target/ppc/mmu-book3s-v3.h
parent03695a9870662ddaeef2e4f2129df31beb6e73bd (diff)
target/ppc: introduce mmu-books.h
Intrudoce a header common to all BookS MMUs, that can hold code that is common to hash32 and book3s-v3 MMUs. Suggested-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210706150316.21005-2-bruno.larsen@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/mmu-book3s-v3.h')
-rw-r--r--target/ppc/mmu-book3s-v3.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/target/ppc/mmu-book3s-v3.h b/target/ppc/mmu-book3s-v3.h
index c89d0bccfd..d6d5ed8f8e 100644
--- a/target/ppc/mmu-book3s-v3.h
+++ b/target/ppc/mmu-book3s-v3.h
@@ -21,6 +21,7 @@
#define PPC_MMU_BOOK3S_V3_H
#include "mmu-hash64.h"
+#include "mmu-books.h"
#ifndef CONFIG_USER_ONLY
@@ -47,19 +48,6 @@ struct prtb_entry {
uint64_t prtbe0, prtbe1;
};
-/*
- * These correspond to the mmu_idx values computed in
- * hreg_compute_hflags_value. See the tables therein
- *
- * They are here because some bits are inverted for BookE MMUs
- * not necessarily because they only work for BookS. However,
- * we only needed to change BookS MMUs, we left the functions
- * here to avoid other possible bugs for untested MMUs
- */
-static inline bool mmuidx_pr(int idx) { return !(idx & 1); }
-static inline bool mmuidx_real(int idx) { return idx & 2; }
-static inline bool mmuidx_hv(int idx) { return idx & 4; }
-
#ifdef TARGET_PPC64
static inline bool ppc64_use_proc_tbl(PowerPCCPU *cpu)