Skip to contentSkip to conversation

leon3: change the handling for ASI_LEON_NOCACHE to be aware of if the MMU is enabled or not

PATCH New Steven Seeger 1 participant 1 message Mar 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 leon3: change the handling for ASI_LEON_NOCACHE to be aware of if the MMU is enabled or not

Quoted 1 line

From f512606776e20dc603b8ea3faaeb103667de3178 Mon Sep 17 00:00:00 2001

From: Steven Seeger <[email protected]>
Date: Sun, 25 Mar 2018 17:58:21 -0400
Subject: [PATCH 1/6] leon3: change the handling for ASI_LEON_NOCACHE to be
aware of if the MMU is enabled or not

---
 target/sparc/translate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
target/sparc/translate.c +0 -0
index f55ec28665..ab8d0a0c72 100644
@@ -2121,6 +2121,9 @@ static DisasASI get_asi(DisasContext *dc, int insn, 

TCGMemOp memop)

                || (asi == ASI_USERDATA
                    && (dc->def->features & CPU_FEATURE_CASA))) {
         switch (asi) {
+        case ASI_LEON_NOCACHE: /* force cache miss */
+            type = GET_ASI_DIRECT;
+            break;
         case ASI_USERDATA:   /* User data access */
             mem_idx = MMU_USER_IDX;
             type = GET_ASI_DIRECT;

@@ -2131,7 +2134,6 @@ static DisasASI get_asi(DisasContext *dc, int insn, TCGMemOp memop)
break;
case ASI_M_BYPASS: /* MMU passthrough */
case ASI_LEON_BYPASS: /* LEON MMU passthrough */
- case ASI_LEON_NOCACHE:

             mem_idx = MMU_PHYS_IDX;
             type = GET_ASI_DIRECT;
             break;
Signature · 1 line
2.16.1