From nobody Wed May 22 03:27:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1611794020; cv=none; d=zohomail.com; s=zohoarc; b=SWCoQ7wApTISh52MA7aWqZBXdqKgiyO9t8JFYyUUk/0/fY8m/WheM46ruckbib/HxnXYqcmmsL2RLJ27tZEhHQcoE5/y5RLzByKSmFjt85VfS6YImTCfkLwtXgStYL7j+3IdSyS8i/4dErFycLURQLw4trf2yzi94/tgpX0bwMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611794020; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KOrjCu/dik44rI4Ge8eVp4+/I8vK1Mod6NSjpLVJ5tA=; b=CxTQq+CHb3e+rVINytdtPjULjNonphhvFfLujKkpehyT5yX54mqfpBSQlwb6r6+HSymnjMIzJE5cEu8SiBfIB++ivoG2bYN+sYBwKoH9aLcSWqmRycB51Zva9dD7qlnGYka6FRFymny/3WDzQI0Y4d59lhmSOlOoNZoqkYTbX8w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611794020732365.13318778934126; Wed, 27 Jan 2021 16:33:40 -0800 (PST) Received: from localhost ([::1]:42538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4vFj-0000C9-Ji for importer@patchew.org; Wed, 27 Jan 2021 19:33:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4vEf-0007hQ-Un for qemu-devel@nongnu.org; Wed, 27 Jan 2021 19:32:34 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:40299) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4vEe-0005Pc-Cj for qemu-devel@nongnu.org; Wed, 27 Jan 2021 19:32:33 -0500 Received: by mail-wm1-x329.google.com with SMTP id c127so3159823wmf.5 for ; Wed, 27 Jan 2021 16:32:32 -0800 (PST) Received: from localhost.localdomain (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id p18sm59605wrx.84.2021.01.27.16.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 16:32:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KOrjCu/dik44rI4Ge8eVp4+/I8vK1Mod6NSjpLVJ5tA=; b=ekBd8a6OPcWilY1i8GFNlj27POCgBjQ7gG+TwHZ/HiG65leTzjeWDWyH/loIrVJ1zE TYOtwSa1fjg5oXdR9cHiVUBfjrcD5mtCgiPjf1x3zPEA9BgFvjk7ff/FqBvyDQJBJquU Yak83OBMNdUr5lkWOTzIJ0q/a/7N8uHrVN31kUpxDvJed4XREbpaCsyt5moZbG2Qp56K L3CpxW6yXTVCnHiB9+QKSQr2/16/xZ6IqI0S2CcWyUaGsh/010zllaCWRdC47c18HWJK b81FwSBcU7UBYb6pR8XKeQCR62AU5rz4S5MrmYtrB6qUSCCduL+lcXPvoxSNy2yv+eMn N/HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KOrjCu/dik44rI4Ge8eVp4+/I8vK1Mod6NSjpLVJ5tA=; b=XVNcXDrm01HJkM2Bbx0cInl4LtUYldQfQSmi+Pt0Eq+TlcNvIT96B0znt0DMHK+ENX jyzDQwpmIZcgL+ZwYBwBBIKfh1plBp3QeEMcRckAbpqusmE8GK3fDCI1IBj6q0PYaA/9 1kpKgr3JULBY6sjl0edC+pMen2mrW/lrbgN0c/0EOhY3rWRIskV0MxnN6/cIf19lseWz r7cXejbyJgVt7DI+cZeTqeKR44EqFbExOFlMKyERwOuam23YsNRgtO9Jzh6Jxqa0uYNg /yjnQAXUIUZlyvXt3zNV07rOz+DfrIvcykG5K+8RVhKLTqD1svr9QrtTrtIS8JA0P0WZ LXqQ== X-Gm-Message-State: AOAM530Wjnhqlu7Y7aRvvj6xWjtmeupYOTWR1QFo7SqUO+3rKjmKBHO9 LQ7WSBIJNumBKdNXI188Y0fqELg/mm0= X-Google-Smtp-Source: ABdhPJwcIKSimdke07yRjsXKN+kiL8siLzWVK5murHOhzrHEs5c7W64lhxPNhUgVU5d0zsf4cX1Lng== X-Received: by 2002:a1c:4b14:: with SMTP id y20mr6439561wma.166.1611793950854; Wed, 27 Jan 2021 16:32:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/2] target/cris: Use MMUAccessType enum type when possible Date: Thu, 28 Jan 2021 01:32:22 +0100 Message-Id: <20210128003223.3561108-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210128003223.3561108-1-f4bug@amsat.org> References: <20210128003223.3561108-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E. Iglesias" , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Joe Komlodi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Replace the 0/1/2 magic values by the corresponding MMUAccessType. We can remove a comment as enum names are self explicit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Reviewed-by: Richard Henderson --- target/cris/helper.c | 4 ++-- target/cris/mmu.c | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/target/cris/helper.c b/target/cris/helper.c index ed45c3d9b70..cc110f1154d 100644 --- a/target/cris/helper.c +++ b/target/cris/helper.c @@ -274,10 +274,10 @@ hwaddr cris_cpu_get_phys_page_debug(CPUState *cs, vad= dr addr) struct cris_mmu_result res; int miss; =20 - miss =3D cris_mmu_translate(&res, &cpu->env, addr, 0, 0, 1); + miss =3D cris_mmu_translate(&res, &cpu->env, addr, MMU_DATA_LOAD, 0, 1= ); /* If D TLB misses, try I TLB. */ if (miss) { - miss =3D cris_mmu_translate(&res, &cpu->env, addr, 2, 0, 1); + miss =3D cris_mmu_translate(&res, &cpu->env, addr, MMU_INST_FETCH,= 0, 1); } =20 if (!miss) { diff --git a/target/cris/mmu.c b/target/cris/mmu.c index a279b7f1b60..294de7dffd5 100644 --- a/target/cris/mmu.c +++ b/target/cris/mmu.c @@ -152,15 +152,15 @@ static int cris_mmu_translate_page(struct cris_mmu_re= sult *res, pid =3D env->pregs[PR_PID] & 0xff; =20 switch (rw) { - case 2: + case MMU_INST_FETCH: rwcause =3D CRIS_MMU_ERR_EXEC; mmu =3D 0; break; - case 1: + case MMU_DATA_STORE: rwcause =3D CRIS_MMU_ERR_WRITE; break; default: - case 0: + case MMU_DATA_LOAD: rwcause =3D CRIS_MMU_ERR_READ; break; } @@ -219,13 +219,13 @@ static int cris_mmu_translate_page(struct cris_mmu_re= sult *res, vaddr, lo, env->pc)); match =3D 0; res->bf_vec =3D vect_base + 2; - } else if (rw =3D=3D 1 && cfg_w && !tlb_w) { + } else if (rw =3D=3D MMU_DATA_STORE && cfg_w && !tlb_w) { D(printf("tlb: write protected %x lo=3D%x pc=3D%x\n", vaddr, lo, env->pc)); match =3D 0; /* write accesses never go through the I mmu. */ res->bf_vec =3D vect_base + 3; - } else if (rw =3D=3D 2 && cfg_x && !tlb_x) { + } else if (rw =3D=3D MMU_INST_FETCH && cfg_x && !tlb_x) { D(printf("tlb: exec protected %x lo=3D%x pc=3D%x\n", vaddr, lo, env->pc)); match =3D 0; @@ -329,8 +329,7 @@ int cris_mmu_translate(struct cris_mmu_result *res, =20 old_srs =3D env->pregs[PR_SRS]; =20 - /* rw =3D=3D 2 means exec, map the access to the insn mmu. */ - env->pregs[PR_SRS] =3D rw =3D=3D 2 ? 1 : 2; + env->pregs[PR_SRS] =3D rw =3D=3D MMU_INST_FETCH ? 1 : 2; =20 if (!cris_mmu_enabled(env->sregs[SFR_RW_GC_CFG])) { res->phy =3D vaddr; --=20 2.26.2 From nobody Wed May 22 03:27:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1611794104; cv=none; d=zohomail.com; s=zohoarc; b=FgJ/qGkytHJi6G7GJ62ASwlo/qBcn8if3ZMgGAE5JQgmhOi3yu82xg25cSLFC45bgMQmh5b/AZIXxqvRaOws0iMX8m0RX4FclkTkBKfeJcjZzI6g5lIsdWX9CzdYSd8cLCqcZkfx9wnveZdC6cwA6nw7zsOnbUldxgQh6wUkrHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611794104; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yynSOShwN9kYTyasc4+k8fP/Bg0LH0sQO2BWUJ68Bgc=; b=dxZqGyZ1LoD7dVws6gscBT+A2jy1KKQPmnlwV2uu3GOQtUP8yt31JjQyAffohd0s3YFDSeSpj+d5//Ed0XqOSqxJOCAQcz+u/Gw03ytaPTp6GouJ8urMytVmknSzjILO+isYUKCajiehcMAp9BIrm0/gKj4ww4Vf0/CifV6Qrns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611794104774286.07034251790026; Wed, 27 Jan 2021 16:35:04 -0800 (PST) Received: from localhost ([::1]:45660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4vH5-0001TT-Iu for importer@patchew.org; Wed, 27 Jan 2021 19:35:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4vEl-0007rF-Bo for qemu-devel@nongnu.org; Wed, 27 Jan 2021 19:32:39 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:37523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4vEj-0005Px-Oa for qemu-devel@nongnu.org; Wed, 27 Jan 2021 19:32:39 -0500 Received: by mail-wm1-x331.google.com with SMTP id c128so3173190wme.2 for ; Wed, 27 Jan 2021 16:32:37 -0800 (PST) Received: from localhost.localdomain (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id x1sm4248415wmi.14.2021.01.27.16.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 16:32:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yynSOShwN9kYTyasc4+k8fP/Bg0LH0sQO2BWUJ68Bgc=; b=EOxvEYSyc71H1nqvxHzJXATcrCbyMZOEMynzWfGitn7i1idl08kvvxDrrGuAT9iLH2 64seFAZHVLxY02toANzY9pZVzllUrBffZxYYAopD30Ki0/mHLN+JHyRKHUlw6fz1/yrb CN3P6oGNNFLhu5b3qKjqRh2gWmi4Wc5ZvXq3oj9mCrpHc1R2IKpSE4YKg7r8ZCgSm1P0 eSfOdEzxPZMInkhRSIuYCjybwm4FVXzu0dvn2T1az6QWuys9iuKgQWSDEgM6nEE6zeer yY+0ytrOMABr4h67cDNWCixsW+sVtYMv50nF7SNPK1TGKfKs/a5u02HxLU0Hz4zudXGS /Mrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=yynSOShwN9kYTyasc4+k8fP/Bg0LH0sQO2BWUJ68Bgc=; b=UC/T2PZJb5DxjyVCgR1GgxglpvECaEFVejp2QZQR/M9EJaSpULUjXSqg5fexff5dNG XXy0pyq+JO5mBrQO2f+a0wRuHyEewDH+ifTsLhOhdSdmIIGivnKfsnL+B1bQ5aU9+o76 +romoY/DVqG49hrRM2mE/htVwastcYagh+/kLKzH9ImRtyCh4bHm/ujfeFYLhRMkDJ1v zwXQO1d6jqSUbq13Yl6+qPAGO/3xHLJPiFBoRRssPApxkl4q2+e1tqEu2vwkcdFDAauC drUWRcSqJmyZo4szc8F2Rzvl5AcrGgiJ7J9MA+xgXfNgq0BV+6xFDfncTtUIr+V3Qcaa /pcA== X-Gm-Message-State: AOAM532SBAsAkKvN9T4Oc5A6ClyzKbhkq6peC9jFh8AclLu24WX2qKGE LmY7LNuh8aaKSM16f34bztMT5/FVrE0= X-Google-Smtp-Source: ABdhPJzZa8lB8u/RHuGBoAT7KIlMYqXA745IC+4eY+QykPP16XC9qdr9AeN8Gr5dR35a59hRrnhmEA== X-Received: by 2002:a1c:b68b:: with SMTP id g133mr6273446wmf.7.1611793956057; Wed, 27 Jan 2021 16:32:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/2] target/cris: Let cris_mmu_translate() use MMUAccessType access_type Date: Thu, 28 Jan 2021 01:32:23 +0100 Message-Id: <20210128003223.3561108-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210128003223.3561108-1-f4bug@amsat.org> References: <20210128003223.3561108-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E. Iglesias" , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Joe Komlodi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) All callers of cris_mmu_translate() provide a MMUAccessType type. Let the prototype use it as argument, as it is stricter than an integer. We can remove the documentation as enum names are self explicit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Reviewed-by: Richard Henderson --- target/cris/mmu.h | 2 +- target/cris/mmu.c | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/target/cris/mmu.h b/target/cris/mmu.h index 9ab1642b964..d57386ec6cd 100644 --- a/target/cris/mmu.h +++ b/target/cris/mmu.h @@ -17,6 +17,6 @@ void cris_mmu_init(CPUCRISState *env); void cris_mmu_flush_pid(CPUCRISState *env, uint32_t pid); int cris_mmu_translate(struct cris_mmu_result *res, CPUCRISState *env, uint32_t vaddr, - int rw, int mmu_idx, int debug); + MMUAccessType access_type, int mmu_idx, int debug); =20 #endif diff --git a/target/cris/mmu.c b/target/cris/mmu.c index 294de7dffd5..b574ec6e5b9 100644 --- a/target/cris/mmu.c +++ b/target/cris/mmu.c @@ -129,10 +129,10 @@ static void dump_tlb(CPUCRISState *env, int mmu) } #endif =20 -/* rw 0 =3D read, 1 =3D write, 2 =3D exec. */ static int cris_mmu_translate_page(struct cris_mmu_result *res, - CPUCRISState *env, uint32_t vaddr, - int rw, int usermode, int debug) + CPUCRISState *env, uint32_t vaddr, + MMUAccessType access_type, + int usermode, int debug) { unsigned int vpage; unsigned int idx; @@ -151,7 +151,7 @@ static int cris_mmu_translate_page(struct cris_mmu_resu= lt *res, r_cfg =3D env->sregs[SFR_RW_MM_CFG]; pid =3D env->pregs[PR_PID] & 0xff; =20 - switch (rw) { + switch (access_type) { case MMU_INST_FETCH: rwcause =3D CRIS_MMU_ERR_EXEC; mmu =3D 0; @@ -219,13 +219,13 @@ static int cris_mmu_translate_page(struct cris_mmu_re= sult *res, vaddr, lo, env->pc)); match =3D 0; res->bf_vec =3D vect_base + 2; - } else if (rw =3D=3D MMU_DATA_STORE && cfg_w && !tlb_w) { + } else if (access_type =3D=3D MMU_DATA_STORE && cfg_w && !tlb_w) { D(printf("tlb: write protected %x lo=3D%x pc=3D%x\n", vaddr, lo, env->pc)); match =3D 0; /* write accesses never go through the I mmu. */ res->bf_vec =3D vect_base + 3; - } else if (rw =3D=3D MMU_INST_FETCH && cfg_x && !tlb_x) { + } else if (access_type =3D=3D MMU_INST_FETCH && cfg_x && !tlb_x) { D(printf("tlb: exec protected %x lo=3D%x pc=3D%x\n", vaddr, lo, env->pc)); match =3D 0; @@ -272,9 +272,9 @@ static int cris_mmu_translate_page(struct cris_mmu_resu= lt *res, D(printf("refill vaddr=3D%x pc=3D%x\n", vaddr, env->pc)); } =20 - D(printf("%s rw=3D%d mtch=3D%d pc=3D%x va=3D%x vpn=3D%x tlbvpn=3D%x pf= n=3D%x pid=3D%x" + D(printf("%s access=3D%u mtch=3D%d pc=3D%x va=3D%x vpn=3D%x tlbvpn=3D%= x pfn=3D%x pid=3D%x" " %x cause=3D%x sel=3D%x sp=3D%x %x %x\n", - __func__, rw, match, env->pc, + __func__, access_type, match, env->pc, vaddr, vpage, tlb_vpn, tlb_pfn, tlb_pid, pid, @@ -319,8 +319,8 @@ void cris_mmu_flush_pid(CPUCRISState *env, uint32_t pid) } =20 int cris_mmu_translate(struct cris_mmu_result *res, - CPUCRISState *env, uint32_t vaddr, - int rw, int mmu_idx, int debug) + CPUCRISState *env, uint32_t vaddr, + MMUAccessType access_type, int mmu_idx, int debug) { int seg; int miss =3D 0; @@ -329,7 +329,7 @@ int cris_mmu_translate(struct cris_mmu_result *res, =20 old_srs =3D env->pregs[PR_SRS]; =20 - env->pregs[PR_SRS] =3D rw =3D=3D MMU_INST_FETCH ? 1 : 2; + env->pregs[PR_SRS] =3D access_type =3D=3D MMU_INST_FETCH ? 1 : 2; =20 if (!cris_mmu_enabled(env->sregs[SFR_RW_GC_CFG])) { res->phy =3D vaddr; @@ -346,7 +346,7 @@ int cris_mmu_translate(struct cris_mmu_result *res, res->phy =3D base | (0x0fffffff & vaddr); res->prot =3D PAGE_BITS; } else { - miss =3D cris_mmu_translate_page(res, env, vaddr, rw, + miss =3D cris_mmu_translate_page(res, env, vaddr, access_type, is_user, debug); } done: --=20 2.26.2