QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Anthony Green" <green@moxielogic.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Joe Komlodi" <komlodi@xilinx.com>
Subject: [PATCH] target/moxie: Let moxie_mmu_translate() use MMUAccessType access_type
Date: Thu, 28 Jan 2021 01:36:08 +0100
Message-ID: <20210128003608.3563322-1-f4bug@amsat.org> (raw)

moxie_mmu_translate() doesn't do much work. Still keep its
prototype similar to the other targets, by taking a MMUAccessType
argument.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/moxie/mmu.h    | 2 +-
 target/moxie/helper.c | 2 +-
 target/moxie/mmu.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/moxie/mmu.h b/target/moxie/mmu.h
index d80690f4d2f..9fddc336746 100644
--- a/target/moxie/mmu.h
+++ b/target/moxie/mmu.h
@@ -14,6 +14,6 @@ typedef struct {
 
 int moxie_mmu_translate(MoxieMMUResult *res,
                         CPUMoxieState *env, uint32_t vaddr,
-                        int rw, int mmu_idx);
+                        MMUAccessType access_type, int mmu_idx);
 
 #endif
diff --git a/target/moxie/helper.c b/target/moxie/helper.c
index b1919f62b34..0e72b1726e3 100644
--- a/target/moxie/helper.c
+++ b/target/moxie/helper.c
@@ -112,7 +112,7 @@ hwaddr moxie_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
     MoxieMMUResult res;
     int miss;
 
-    miss = moxie_mmu_translate(&res, &cpu->env, addr, 0, 0);
+    miss = moxie_mmu_translate(&res, &cpu->env, addr, MMU_DATA_LOAD, 0);
     if (!miss) {
         phy = res.phy;
     }
diff --git a/target/moxie/mmu.c b/target/moxie/mmu.c
index 87783a36f82..228d4c42ff4 100644
--- a/target/moxie/mmu.c
+++ b/target/moxie/mmu.c
@@ -24,7 +24,7 @@
 
 int moxie_mmu_translate(MoxieMMUResult *res,
                        CPUMoxieState *env, uint32_t vaddr,
-                       int rw, int mmu_idx)
+                       MMUAccessType access_type, int mmu_idx)
 {
     /* Perform no translation yet.  */
     res->phy = vaddr;
-- 
2.26.2



                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210128003608.3563322-1-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=green@moxielogic.com \
    --cc=komlodi@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git
	git clone --mirror https://lore.kernel.org/qemu-devel/2 qemu-devel/git/2.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git