From nobody Wed May 22 03:29:41 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=1611789813; cv=none; d=zohomail.com; s=zohoarc; b=lponjJ3lP+TifR6xQcMGQieLPVb4QIlQfwu1FtKhw9dhGRqPSFc2O1zS9yOw2j9HNXKJlHFPokOcIlPejcl/xNA7J2SSIzebBT2IDAvEuD5VJXMeSMluBGxQDQOWnj7u7lHsuR8UtRQzaZGf9ox95aQLg+1g7Oll8u0mztzTEg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611789813; 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=wrmBhBrTEeGFewV5R3wfy11aAEXgfzoclhrlpdg6/U8=; b=ZZPonVfJbEBfwod4YCxuURvP3e+NelLgESPUXGtDHV+J11sFAuzdF2XsEF+8czZhPdwKr+gi9kTh4CEDuTeBdv2xLuiJfJCEp9LUY+HGDZwTVgKu+88LHb3gvBfWvqS9MG9citSiTlPrG5MIvL4HyWjaLq6rvODYEN7fXauwVoA= 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 1611789813639619.2378707101294; Wed, 27 Jan 2021 15:23:33 -0800 (PST) Received: from localhost ([::1]:51856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4u9s-0002BU-H3 for importer@patchew.org; Wed, 27 Jan 2021 18:23:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4u8R-0000ml-0o for qemu-devel@nongnu.org; Wed, 27 Jan 2021 18:22:03 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:34994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4u8O-0006Ej-W7 for qemu-devel@nongnu.org; Wed, 27 Jan 2021 18:22:02 -0500 Received: by mail-wr1-x433.google.com with SMTP id l12so3647157wry.2 for ; Wed, 27 Jan 2021 15:22:00 -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 r25sm5050321wrr.64.2021.01.27.15.21.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 15:21:58 -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=wrmBhBrTEeGFewV5R3wfy11aAEXgfzoclhrlpdg6/U8=; b=kIwDp4jab50EaNFYFJIW1KL0k931M7a/ZmBFJ7xCHzc2aA/nV2B8GQnGHX8A7rQppg AfoS9xmNjW/anla3cc7lrJwp3CutuWosXC9lAChHr1ltz2VF6RO/ijx7xlSr4xqkbeKs eRo2FaPtYjfrkDh7fzFMU8kDZB52GsuLccvYRJr4VNAxi36HswijsBIjlbwvI4riSWOA LjBHNQdLmpx784wqGlELuRR/LKy9cDLr3DpAslvqMT+eXIpTnGdGQqAcdQOFQTz1Oxlz 8eeSrk0sGEEeO+9RaEbMVmMWe3qaaJwGIR/1Us+iZbkqr6eWbk3KVJ/1UGm+gFev8ZBe QnOg== 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=wrmBhBrTEeGFewV5R3wfy11aAEXgfzoclhrlpdg6/U8=; b=czLd2XQ92pe6OYhZMozHm3XWjynpFs00q4DTw1f6JJ0h5/a4+COPMVyDFQWqQuVSaO YdM9cMcxz6zTAu0y7gxQ7BydyswzwAFD6Ds9q6rS9YyJWGWjp+UR60Yj/RsNeBTX5Who 5ScyTTP/mZMdK5I2F46138PfnkmB9JvxS8gfr5HAoMRkWcx454EklaczPiX+Ye3GaCuP CWYROrkLGeAmuc7S59auHwTjhGMQYoWumpuR/Y33VWIgPwjz6aBsCYfK93MFPp7xyHfo LG6TSJrz6g8n9SityIDJf5x4Nx14t0FJrK6IFV84v8N9Ij9RNTbzNboCRQ2Vx0+o1uuc Jy0Q== X-Gm-Message-State: AOAM531OCWWJz/xDCI20MrZa+dWqqMH8XpKuxylamC84dSYgKhsmBEsy 2yKdlHKaCdQmeTigc4/EQs+Gp7IP09g= X-Google-Smtp-Source: ABdhPJyDq/H0sS3f2oP4Y1W/2M+gFp8Ge215dCAFhDxnGYA9JswSEu0UH3C90RqVmEm8DQ8lTQyJIQ== X-Received: by 2002:adf:c413:: with SMTP id v19mr13483760wrf.158.1611789719270; Wed, 27 Jan 2021 15:21:59 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/5] target/sh4: Fix code style for checkpatch.pl Date: Thu, 28 Jan 2021 00:21:47 +0100 Message-Id: <20210127232151.3523581-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210127232151.3523581-1-f4bug@amsat.org> References: <20210127232151.3523581-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::433; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x433.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: Richard Henderson , Joe Komlodi , Yoshinori Sato , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We are going to move this code, fix its style first. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- Easier to review using 'git-diff -w -b' --- target/sh4/helper.c | 82 ++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/target/sh4/helper.c b/target/sh4/helper.c index 408478ce5dc..fc816137766 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -330,8 +330,8 @@ static int find_utlb_entry(CPUSH4State * env, target_ul= ong address, int use_asid MMU_IADDR_ERROR, MMU_DADDR_ERROR_READ, MMU_DADDR_ERROR_WRITE. */ static int get_mmu_address(CPUSH4State * env, target_ulong * physical, - int *prot, target_ulong address, - int rw, int access_type) + int *prot, target_ulong address, + int rw, int access_type) { int use_asid, n; tlb_t *matching =3D NULL; @@ -340,12 +340,12 @@ static int get_mmu_address(CPUSH4State * env, target_= ulong * physical, =20 if (rw =3D=3D 2) { n =3D find_itlb_entry(env, address, use_asid); - if (n >=3D 0) { - matching =3D &env->itlb[n]; + if (n >=3D 0) { + matching =3D &env->itlb[n]; if (!(env->sr & (1u << SR_MD)) && !(matching->pr & 2)) { - n =3D MMU_ITLB_VIOLATION; + n =3D MMU_ITLB_VIOLATION; } else { - *prot =3D PAGE_EXEC; + *prot =3D PAGE_EXEC; } } else { n =3D find_utlb_entry(env, address, use_asid); @@ -365,14 +365,14 @@ static int get_mmu_address(CPUSH4State * env, target_= ulong * physical, } else if (n =3D=3D MMU_DTLB_MISS) { n =3D MMU_ITLB_MISS; } - } + } } else { - n =3D find_utlb_entry(env, address, use_asid); - if (n >=3D 0) { - matching =3D &env->utlb[n]; + n =3D find_utlb_entry(env, address, use_asid); + if (n >=3D 0) { + matching =3D &env->utlb[n]; if (!(env->sr & (1u << SR_MD)) && !(matching->pr & 2)) { - n =3D (rw =3D=3D 1) ? MMU_DTLB_VIOLATION_WRITE : - MMU_DTLB_VIOLATION_READ; + n =3D (rw =3D=3D 1) + ? MMU_DTLB_VIOLATION_WRITE : MMU_DTLB_VIOLATION_READ; } else if ((rw =3D=3D 1) && !(matching->pr & 1)) { n =3D MMU_DTLB_VIOLATION_WRITE; } else if ((rw =3D=3D 1) && !matching->d) { @@ -383,15 +383,15 @@ static int get_mmu_address(CPUSH4State * env, target_= ulong * physical, *prot |=3D PAGE_WRITE; } } - } else if (n =3D=3D MMU_DTLB_MISS) { - n =3D (rw =3D=3D 1) ? MMU_DTLB_MISS_WRITE : - MMU_DTLB_MISS_READ; - } + } else if (n =3D=3D MMU_DTLB_MISS) { + n =3D (rw =3D=3D 1) + ? MMU_DTLB_MISS_WRITE : MMU_DTLB_MISS_READ; + } } if (n >=3D 0) { - n =3D MMU_OK; - *physical =3D ((matching->ppn << 10) & ~(matching->size - 1)) | - (address & (matching->size - 1)); + n =3D MMU_OK; + *physical =3D ((matching->ppn << 10) & ~(matching->size - 1)) + | (address & (matching->size - 1)); } return n; } @@ -401,34 +401,34 @@ static int get_physical_address(CPUSH4State * env, ta= rget_ulong * physical, int rw, int access_type) { /* P1, P2 and P4 areas do not use translation */ - if ((address >=3D 0x80000000 && address < 0xc0000000) || - address >=3D 0xe0000000) { + if ((address >=3D 0x80000000 && address < 0xc0000000) || address >=3D = 0xe0000000) { if (!(env->sr & (1u << SR_MD)) - && (address < 0xe0000000 || address >=3D 0xe4000000)) { - /* Unauthorized access in user mode (only store queues are available)= */ + && (address < 0xe0000000 || address >=3D 0xe4000000)) { + /* Unauthorized access in user mode (only store queues are ava= ilable) */ qemu_log_mask(LOG_GUEST_ERROR, "Unauthorized access\n"); - if (rw =3D=3D 0) - return MMU_DADDR_ERROR_READ; - else if (rw =3D=3D 1) - return MMU_DADDR_ERROR_WRITE; - else - return MMU_IADDR_ERROR; - } - if (address >=3D 0x80000000 && address < 0xc0000000) { - /* Mask upper 3 bits for P1 and P2 areas */ - *physical =3D address & 0x1fffffff; - } else { - *physical =3D address; - } - *prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; - return MMU_OK; + if (rw =3D=3D 0) { + return MMU_DADDR_ERROR_READ; + } else if (rw =3D=3D 1) { + return MMU_DADDR_ERROR_WRITE; + } else { + return MMU_IADDR_ERROR; + } + } + if (address >=3D 0x80000000 && address < 0xc0000000) { + /* Mask upper 3 bits for P1 and P2 areas */ + *physical =3D address & 0x1fffffff; + } else { + *physical =3D address; + } + *prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; + return MMU_OK; } =20 /* If MMU is disabled, return the corresponding physical page */ if (!(env->mmucr & MMUCR_AT)) { - *physical =3D address & 0x1FFFFFFF; - *prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; - return MMU_OK; + *physical =3D address & 0x1FFFFFFF; + *prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; + return MMU_OK; } =20 /* We need to resort to the MMU */ --=20 2.26.2 From nobody Wed May 22 03:29:41 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=1611789963; cv=none; d=zohomail.com; s=zohoarc; b=gMhVMdaDfz++KKrphHOb+hB6Q8JW81nvoNdYB1VJsRCtGZ+z1yKF7FeRNB7wKf1z79T91aJYNc+2SYmt3EOjf6v47kGjjAX9lbk0oiVEXJvgs+wSwZrOavC8+/TeL3q5rRXHax7DBUx9AYi8xk+QHNmBirO6V8RVP3VvnErov3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611789963; 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=6WbbRQjXYliuhYJkNz9Ad7zq4xSuA4zUEY6hD8fYDAc=; b=blVtHu+28LvlzFt+FX04dEd9t0hoFl9/L34kTArqhOciYdvNsrFC92j8QvdFZhX/yZgIpE/1BaZMrHezx2fS2lkLQQLrXrT+YTIzCTRLhImsJkfimGMpyr357uVYKb7aPQNpt+nYfKCy0ijdOcypTNa9mmSQ9txCfhqfUQwHT+8= 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 1611789963584323.2103845256647; Wed, 27 Jan 2021 15:26:03 -0800 (PST) Received: from localhost ([::1]:59412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4uCI-0005Gn-FS for importer@patchew.org; Wed, 27 Jan 2021 18:26:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4u8V-0000t0-NT for qemu-devel@nongnu.org; Wed, 27 Jan 2021 18:22:07 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:39843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4u8U-0006FP-6k for qemu-devel@nongnu.org; Wed, 27 Jan 2021 18:22:07 -0500 Received: by mail-wm1-x333.google.com with SMTP id u14so3055290wmq.4 for ; Wed, 27 Jan 2021 15:22:05 -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 z18sm4718576wro.91.2021.01.27.15.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 15:22:03 -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=6WbbRQjXYliuhYJkNz9Ad7zq4xSuA4zUEY6hD8fYDAc=; b=Gg8DYFX6calRieL6MDKlfaaCgjl7oBsLqytiTDOVCoGH5ub92DOwd51TUWnJ90VL3B RRBfMAEGluRMtUE4P0ZdOyRs82khuuur56/pXErjMgxybnhCnVP7EdlpWNLYYq0ShJ96 vYC9Zby7iXVT+MHtW+GX999WZS1jH6ohPuq+T/7FPyxS8l9hUPj3hYRWvSpOv4FY0Nj7 PRZNGKQepAVpJYxdy6YZDcqQqGTBiGVc8oglmPX1qD/cWKDOTJBWLKEGXqEyp6Ar4uRe PTi9kWIiBxY2t7dml/K9pf3CI5Ys8U0n6VqNW+6kVcs1tK1c3StxHjKlRnemSswr0DbH 6ywA== 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=6WbbRQjXYliuhYJkNz9Ad7zq4xSuA4zUEY6hD8fYDAc=; b=E3Y4atWWskywEoNtpq5SO0C750KoTb3WivAHX95VQ0EoHrPCjKA1GtLsLp2cBZ5n/9 RolRU/ykZ64jKJWNcHw/xQnlnG+/Pgp9QZ8OHC/ZN68l7jfpV9trJte4uzXu7S1d6ql9 UOfhzOx8QlkizmSRaVR8mNbi9PhQrSHcJIcDYlqNM8JrlrhxVW8uHEhAYgQDV/X4ImwP d/lU4hbyKF5jGDoU4YGCOGMjbAfH/3sWA0Kw4IlL3I0w2jWXov6W/vQfCM9WZbyLpw7K JLraQY31yS33NQoO/CfYuoRmktPdLuEY5j3kM98QCy6N4xAKlramOrPeIAtVFt7jbN+9 I3UQ== X-Gm-Message-State: AOAM533tO6ViRWW485x+pHMavuVWKJaY4mkS5rl238Pv7mdfNT4RRsJH Mchkp3qu4q3el+T7QTw62D+Bciu28bw= X-Google-Smtp-Source: ABdhPJxzmJTwgXnk3QX6d1wP10R7j3csvXIubXezi6zqy8RIcWvmwI48U+s3C52D54qOrF+74GsEOQ== X-Received: by 2002:a05:600c:3549:: with SMTP id i9mr6268002wmq.47.1611789724420; Wed, 27 Jan 2021 15:22:04 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/5] target/sh4: Replace magic value by MMUAccessType definitions Date: Thu, 28 Jan 2021 00:21:48 +0100 Message-Id: <20210127232151.3523581-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210127232151.3523581-1-f4bug@amsat.org> References: <20210127232151.3523581-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::333; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x333.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: Richard Henderson , Joe Komlodi , Yoshinori Sato , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/sh4/helper.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/sh4/helper.c b/target/sh4/helper.c index fc816137766..4303ebf018b 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -338,7 +338,7 @@ static int get_mmu_address(CPUSH4State * env, target_ul= ong * physical, =20 use_asid =3D !(env->mmucr & MMUCR_SV) || !(env->sr & (1u << SR_MD)); =20 - if (rw =3D=3D 2) { + if (rw =3D=3D MMU_INST_FETCH) { n =3D find_itlb_entry(env, address, use_asid); if (n >=3D 0) { matching =3D &env->itlb[n]; @@ -371,11 +371,11 @@ static int get_mmu_address(CPUSH4State * env, target_= ulong * physical, if (n >=3D 0) { matching =3D &env->utlb[n]; if (!(env->sr & (1u << SR_MD)) && !(matching->pr & 2)) { - n =3D (rw =3D=3D 1) + n =3D (rw =3D=3D MMU_DATA_STORE) ? MMU_DTLB_VIOLATION_WRITE : MMU_DTLB_VIOLATION_READ; - } else if ((rw =3D=3D 1) && !(matching->pr & 1)) { + } else if ((rw =3D=3D MMU_DATA_STORE) && !(matching->pr & 1)) { n =3D MMU_DTLB_VIOLATION_WRITE; - } else if ((rw =3D=3D 1) && !matching->d) { + } else if ((rw =3D=3D MMU_DATA_STORE) && !matching->d) { n =3D MMU_DTLB_INITIAL_WRITE; } else { *prot =3D PAGE_READ; @@ -384,7 +384,7 @@ static int get_mmu_address(CPUSH4State * env, target_ul= ong * physical, } } } else if (n =3D=3D MMU_DTLB_MISS) { - n =3D (rw =3D=3D 1) + n =3D (rw =3D=3D MMU_DATA_STORE) ? MMU_DTLB_MISS_WRITE : MMU_DTLB_MISS_READ; } } @@ -406,9 +406,9 @@ static int get_physical_address(CPUSH4State * env, targ= et_ulong * physical, && (address < 0xe0000000 || address >=3D 0xe4000000)) { /* Unauthorized access in user mode (only store queues are ava= ilable) */ qemu_log_mask(LOG_GUEST_ERROR, "Unauthorized access\n"); - if (rw =3D=3D 0) { + if (rw =3D=3D MMU_DATA_LOAD) { return MMU_DADDR_ERROR_READ; - } else if (rw =3D=3D 1) { + } else if (rw =3D=3D MMU_DATA_STORE) { return MMU_DADDR_ERROR_WRITE; } else { return MMU_IADDR_ERROR; @@ -441,7 +441,7 @@ hwaddr superh_cpu_get_phys_page_debug(CPUState *cs, vad= dr addr) target_ulong physical; int prot; =20 - get_physical_address(&cpu->env, &physical, &prot, addr, 0, 0); + get_physical_address(&cpu->env, &physical, &prot, addr, MMU_DATA_LOAD,= 0); return physical; } =20 --=20 2.26.2 From nobody Wed May 22 03:29:41 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=1611789824; cv=none; d=zohomail.com; s=zohoarc; b=Guh5Nysuer6XBgYruE7OAufGM6LnfJ5r3TuqF/CSDjrVZfRE5rdUbGeHn+VCJzuIUgv9f6aTcUUtQA511HLPP1Mv+Uap3ud3SWJa1mT59x7bGvIvQVM/Aps8X4khbdEdOLzPqiMPIleiEhzdqIIXX/vHjsoDhxc3oWjF9Hbq1Sg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611789824; 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=uaR1HWYQodSHOqm/Miyng3SlcyOxsAAfxUqWlGYCQF0=; b=jHvWkkJZIPKX6rdb+VDGj96r8aIZvcV+OSNsWM+7GuJY9v7KdUdiNDJ0qm39oKC5IQQoh+934stnLGytgItabDAsjYmRp2k4YU7z2hx1yvIOLrcujNV+onXq6CdmhwPwekgdbSiaIlb7RjHiCIGhzGbdjXXGvwPiNUBmKC1Obc0= 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 1611789824456607.3396867729297; Wed, 27 Jan 2021 15:23:44 -0800 (PST) Received: from localhost ([::1]:52918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4uA3-0002ba-Bw for importer@patchew.org; Wed, 27 Jan 2021 18:23:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4u8a-00010C-Uj for qemu-devel@nongnu.org; Wed, 27 Jan 2021 18:22:12 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:50264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4u8Z-0006Fp-Bk for qemu-devel@nongnu.org; Wed, 27 Jan 2021 18:22:12 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 190so2839242wmz.0 for ; Wed, 27 Jan 2021 15:22:10 -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 a6sm3760308wmj.27.2021.01.27.15.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 15:22:08 -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=uaR1HWYQodSHOqm/Miyng3SlcyOxsAAfxUqWlGYCQF0=; b=VTBKgA5IKld8YRDDqG0RjhQ+wEQlpLRhpwP7iuShvOeFsANBBsxvGDvj0CZ4XzzZR5 PeB2AIU0eq3uBOpumQwgrsVf37VWhauTU0SS3lqIdbB25hTW8ZW7jrMydROk9phMvVvg c7hzAF/OQqrV4uQh+A593h9j+AHjcH3kVThhUUivrZs75YKzTti0oiJ4Ztiy583k7xzx KOyL9HR1pjHdNppwg/h94dhW8umHOem4xucONhQHb/nBH7KQorspD1DG6vGU1A4YXsQL +6UpPNaXZiLz9cHrP+7JGui4Q46dQQG1OAHU0cqP1v+CwTJMqvtwFCp2wHfszIHEx/Gl mh8Q== 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=uaR1HWYQodSHOqm/Miyng3SlcyOxsAAfxUqWlGYCQF0=; b=MDIUe+lT6MiAZa0R89BMB/fTSslRlWTE3sPsASiG6+xU7iPAS7ubHUzlGhAUa5EtDr IOnPSR/T5FiMt21NXFJRxX84o2UWTjsYazSSFWYkKJWWp62UaKRc2LOg2s8E7E+A7tce WLUh+X5dWswLxTL4p1EMkt57jvk9n/msG8KOTV4eBOFGCG5YDj3BXpqCDdhQ7UKmsy2i P861nKLQCQFdeFm0j4/sa83E+mmpmKDrRlu21OWYpiuzBSIHdJMZn3j2Zw8smvaQ0cl1 jQPQzncB8o8/SDMSeb9/2NuCR2A4cUVI9dqkM3UMsQfIOiwo/BvIF9Z4/husGpY+V1++ asHg== X-Gm-Message-State: AOAM530AybmO895Txil+BRzE265/B4nJgX3WcmOqW/eFLV3/QQfsodjY GGcJGmwWH6br5VqgR7Zctc6DNpXCMG8= X-Google-Smtp-Source: ABdhPJwe/1P/vFM7Ekq/q9Q6VfrctSacQRpMwS3no7nafIfuqZED9rC5iqIjXHey7UtCU7mU34tcIg== X-Received: by 2002:a05:600c:230e:: with SMTP id 14mr6040133wmo.161.1611789729590; Wed, 27 Jan 2021 15:22:09 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/5] target/sh4: Pass mmu_idx to get_physical_address() Date: Thu, 28 Jan 2021 00:21:49 +0100 Message-Id: <20210127232151.3523581-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210127232151.3523581-1-f4bug@amsat.org> References: <20210127232151.3523581-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::32c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32c.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: Richard Henderson , Joe Komlodi , Yoshinori Sato , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) get_mmu_address() and get_physical_address() don't use their 'int access_type' argument: remove it along with ACCESS_INT in superh_cpu_tlb_fill(). Pass the MMU index along, as other targets do. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/sh4/helper.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/target/sh4/helper.c b/target/sh4/helper.c index 4303ebf018b..737938d2fd1 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -331,7 +331,7 @@ static int find_utlb_entry(CPUSH4State * env, target_ul= ong address, int use_asid */ static int get_mmu_address(CPUSH4State * env, target_ulong * physical, int *prot, target_ulong address, - int rw, int access_type) + int rw, int mmu_idx) { int use_asid, n; tlb_t *matching =3D NULL; @@ -398,7 +398,7 @@ static int get_mmu_address(CPUSH4State * env, target_ul= ong * physical, =20 static int get_physical_address(CPUSH4State * env, target_ulong * physical, int *prot, target_ulong address, - int rw, int access_type) + int rw, int mmu_idx) { /* P1, P2 and P4 areas do not use translation */ if ((address >=3D 0x80000000 && address < 0xc0000000) || address >=3D = 0xe0000000) { @@ -432,7 +432,7 @@ static int get_physical_address(CPUSH4State * env, targ= et_ulong * physical, } =20 /* We need to resort to the MMU */ - return get_mmu_address(env, physical, prot, address, rw, access_type); + return get_mmu_address(env, physical, prot, address, rw, mmu_idx); } =20 hwaddr superh_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) @@ -813,11 +813,10 @@ bool superh_cpu_tlb_fill(CPUState *cs, vaddr address,= int size, MMU_DTLB_VIOLATION_READ); #else target_ulong physical; - int prot, sh_access_type; + int prot; =20 - sh_access_type =3D ACCESS_INT; ret =3D get_physical_address(env, &physical, &prot, address, - access_type, sh_access_type); + access_type, mmu_idx); =20 if (ret =3D=3D MMU_OK) { address &=3D TARGET_PAGE_MASK; --=20 2.26.2 From nobody Wed May 22 03:29:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.52 as permitted sender) client-ip=209.85.221.52; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f52.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1611789736; cv=none; d=zohomail.com; s=zohoarc; b=mKEqG8H53b/eT2zJL5XfYU+MLhk8dhOzM/vsGLiiYs+UQeVkTQR+NB1cK56fR49GMJ6jiyryDQI7/Ejx/SmR4qyiFiICiTkFrpA0V/3gY1Z9nnWyFsZ45JD2Ljabn8AwXmlKQBPz5DOYI1/wUzujg/i2jzdcivET9RsuZiyZc4Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611789736; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gC5PlB4hjqAvtWqskaMHj+n0ZuQPzFbL27s012MYxIQ=; b=bHO2KbvmUpksuV5oouE1guLB3o42mcKHc3NWqlEdNQN3Ps+X1BJsnCXLi5pKCAKiHQED4bPj79SOay+9BaPx6VHCSbhwmjx+jkcp/E4d9gwYHHGyg430YjBzH/UGRqzPGOx6Ie/TGnh9Ijy5moiSxZ5Te8of9nsFzMm/PVGFZSU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.zohomail.com with SMTPS id 16117897365591018.1112883344554; Wed, 27 Jan 2021 15:22:16 -0800 (PST) Received: by mail-wr1-f52.google.com with SMTP id l12so3647704wry.2 for ; Wed, 27 Jan 2021 15:22:16 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id l84sm3980079wmf.17.2021.01.27.15.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 15:22:14 -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=gC5PlB4hjqAvtWqskaMHj+n0ZuQPzFbL27s012MYxIQ=; b=H5xE26xeRn1Ith5Fs+yQgnliYA7j5mkeJshEczdDBWudhW1pZXHSQDWmRpz7K7Rz/Y FUTnzkwHTn8RcHJMWZWI13W6HO5xsO/vOq0SdBbgBnvUk8P1UzvU5vSV3/qf8ku9KhuA ZPNT18QABIH9PvOer9A4yv0aZsy6/mpwI+5mLAZCZUw9v3Fp0lAVYeMdMRoFsalEc1Z7 Xp5Mq7SP7zhnSmRLoIw5tM41Tnf/uJN+vyjUQXKgFg0efNgzr5nHWDoRWXuKKo9DiyeJ zSjs4oxEAezdY8UR+V/M3OMbO1mHBpsUGyaQh8RGXVbLNpLhGgFhWZK5BUELmi4QRCon bq/Q== 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=gC5PlB4hjqAvtWqskaMHj+n0ZuQPzFbL27s012MYxIQ=; b=BZYYqIaih2WyqIP5AAW4AGF+6pSlbeZbOxB9EKzHZHYJd0EwMF5ogFf/w7NcMwqD+C h7YruIiMz7UZ5bxrZ3/yqVYqD5pT/U4zJedkelHeMNdiAzzK/57iLPkHDDu/EPb1lTSk mKa/yoOo8R32y0ODmstuiGyPMMHs1AymUhqunvlQ4uiB2P1LqqzZxfyN8Hkm6Ns2xqow v20iUoX8IiLloAIauqaa1KWozoziu4w61Cxrewwb4pg932oE1wpL4KOGvxrrmXr6BlsU AQEvdQxcyXQE747Wq/WOww/3mYk65V8PQQ8hez1mT27LyaEZX8dFQN3IuzQ8wFiAezNb 47Hg== X-Gm-Message-State: AOAM532rv1uuykvBHLKKzWeVjn6se3Zd6f4OPtYufzvs5f40BebyZT4u Fi30rBvqApd/UAMaXmGjKNY= X-Google-Smtp-Source: ABdhPJyqDtskjb6l69TFXwJi9XzYBjXAvCNGGskflme52gmYkDhTNy1BkZrJR4xw6IbzQZdBdlTq9A== X-Received: by 2002:adf:fbd2:: with SMTP id d18mr13597474wrs.222.1611789734879; Wed, 27 Jan 2021 15:22:14 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yoshinori Sato , Richard Henderson , Joe Komlodi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/5] target/sh4: Let get_physical_address() use MMUAccessType access_type Date: Thu, 28 Jan 2021 00:21:50 +0100 Message-Id: <20210127232151.3523581-5-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210127232151.3523581-1-f4bug@amsat.org> References: <20210127232151.3523581-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) superh_cpu_tlb_fill() already provides a access_type variable of type MMUAccessType, and it is passed along, but casted as integer and renamed 'rw'. Simply replace 'int rw' by 'MMUAccessType access_type'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/sh4/helper.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/sh4/helper.c b/target/sh4/helper.c index 737938d2fd1..fad5f906ef6 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -331,14 +331,14 @@ static int find_utlb_entry(CPUSH4State * env, target_= ulong address, int use_asid */ static int get_mmu_address(CPUSH4State * env, target_ulong * physical, int *prot, target_ulong address, - int rw, int mmu_idx) + MMUAccessType access_type, int mmu_idx) { int use_asid, n; tlb_t *matching =3D NULL; =20 use_asid =3D !(env->mmucr & MMUCR_SV) || !(env->sr & (1u << SR_MD)); =20 - if (rw =3D=3D MMU_INST_FETCH) { + if (access_type =3D=3D MMU_INST_FETCH) { n =3D find_itlb_entry(env, address, use_asid); if (n >=3D 0) { matching =3D &env->itlb[n]; @@ -371,11 +371,11 @@ static int get_mmu_address(CPUSH4State * env, target_= ulong * physical, if (n >=3D 0) { matching =3D &env->utlb[n]; if (!(env->sr & (1u << SR_MD)) && !(matching->pr & 2)) { - n =3D (rw =3D=3D MMU_DATA_STORE) + n =3D (access_type =3D=3D MMU_DATA_STORE) ? MMU_DTLB_VIOLATION_WRITE : MMU_DTLB_VIOLATION_READ; - } else if ((rw =3D=3D MMU_DATA_STORE) && !(matching->pr & 1)) { + } else if ((access_type =3D=3D MMU_DATA_STORE) && !(matching->= pr & 1)) { n =3D MMU_DTLB_VIOLATION_WRITE; - } else if ((rw =3D=3D MMU_DATA_STORE) && !matching->d) { + } else if ((access_type =3D=3D MMU_DATA_STORE) && !matching->d= ) { n =3D MMU_DTLB_INITIAL_WRITE; } else { *prot =3D PAGE_READ; @@ -384,7 +384,7 @@ static int get_mmu_address(CPUSH4State * env, target_ul= ong * physical, } } } else if (n =3D=3D MMU_DTLB_MISS) { - n =3D (rw =3D=3D MMU_DATA_STORE) + n =3D (access_type =3D=3D MMU_DATA_STORE) ? MMU_DTLB_MISS_WRITE : MMU_DTLB_MISS_READ; } } @@ -398,7 +398,7 @@ static int get_mmu_address(CPUSH4State * env, target_ul= ong * physical, =20 static int get_physical_address(CPUSH4State * env, target_ulong * physical, int *prot, target_ulong address, - int rw, int mmu_idx) + MMUAccessType access_type, int mmu_idx) { /* P1, P2 and P4 areas do not use translation */ if ((address >=3D 0x80000000 && address < 0xc0000000) || address >=3D = 0xe0000000) { @@ -406,9 +406,9 @@ static int get_physical_address(CPUSH4State * env, targ= et_ulong * physical, && (address < 0xe0000000 || address >=3D 0xe4000000)) { /* Unauthorized access in user mode (only store queues are ava= ilable) */ qemu_log_mask(LOG_GUEST_ERROR, "Unauthorized access\n"); - if (rw =3D=3D MMU_DATA_LOAD) { + if (access_type =3D=3D MMU_DATA_LOAD) { return MMU_DADDR_ERROR_READ; - } else if (rw =3D=3D MMU_DATA_STORE) { + } else if (access_type =3D=3D MMU_DATA_STORE) { return MMU_DADDR_ERROR_WRITE; } else { return MMU_IADDR_ERROR; @@ -432,7 +432,7 @@ static int get_physical_address(CPUSH4State * env, targ= et_ulong * physical, } =20 /* We need to resort to the MMU */ - return get_mmu_address(env, physical, prot, address, rw, mmu_idx); + return get_mmu_address(env, physical, prot, address, access_type, mmu_= idx); } =20 hwaddr superh_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) --=20 2.26.2 From nobody Wed May 22 03:29:41 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; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1611789833; cv=none; d=zohomail.com; s=zohoarc; b=mqIP30/m3nGaEBJ+MAA50KNyREUUJAuWPZwJmTKIAaarzlhyC9XPkdv/0tEhlQKHng0b5nPhSdGYZeLl73BvkvW7wRMhkqNSiRmRAy6Rm7x+0NHijV/phh2SUYRboI/sHwB9xItCUPrZyTY7JvPelEc3J7o941Q5cCQwzW4rm80= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611789833; 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=vwNqOiA5PW40PQw1O00kFHSY1G6Pg3UV8mvbDmHKFwE=; b=VrE/R1gjUriOAoz0x0PsQHNF+zQ1zJ6JIkEaVt6ULYJmV9FB9ON17jPopBC1bfEbENrf28HXUb729Q555ppMVs2j7W4tt2b9HogMWfj58mVLP9uI540ZoxYWhp77i0yF4uuVZRx+DkscufnH5Wg0fSG4zs8ihe2nB2sb9jyPv9w= 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611789833047934.5674827773415; Wed, 27 Jan 2021 15:23:53 -0800 (PST) Received: from localhost ([::1]:53832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4uAB-0002xz-VP for importer@patchew.org; Wed, 27 Jan 2021 18:23:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4u8l-0001K8-2s for qemu-devel@nongnu.org; Wed, 27 Jan 2021 18:22:24 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:34899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4u8j-0006Gi-MJ for qemu-devel@nongnu.org; Wed, 27 Jan 2021 18:22:22 -0500 Received: by mail-wm1-x32b.google.com with SMTP id e15so3067986wme.0 for ; Wed, 27 Jan 2021 15:22:21 -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 y6sm3887566wma.19.2021.01.27.15.22.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 15:22:19 -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=vwNqOiA5PW40PQw1O00kFHSY1G6Pg3UV8mvbDmHKFwE=; b=ejU+uMffEJ180KMbpTYRAzO8WQfWdt3WG1jAi13CcWyjj2ahWumVdUHuTPDFxnq7/A LYXUts0GofDqz5G/QxQEMD1BwLaJ5UywkOoINPUQ3Fh0b7KSnmwNUWvKhz0BDyC/oQ/u h5MEth3diAOAF7tdWK4XVGYri6Xhuajj9dIiuRQGMwAerTtsxGU3o+H+t+fyMcO4vkPa y2FdfRvhz8ajWicu7cJOZMxAtNsU0FXIJKp5+UEf4hoBBMdTkF9Jxu1UQxmwFKOf2sdl R5A+l3aXpcLUUU0vepC8w1KxmINHViT0t2nU8j/yaFXwRN1mT3W8FcENhYYYeUDp8WHw ITUw== 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=vwNqOiA5PW40PQw1O00kFHSY1G6Pg3UV8mvbDmHKFwE=; b=joDZn9q9PQebxTI/QqEObHcTWZiKoKR3/zqjmaPR8nLys4asygF86yrswZ627bHd3Q Svgfo9JxwVPjZS/ps7MP2fxFNcjoEFR90ezSCNQyd/NNCJMPOzzIpBrOtfR9smvKJDs8 GPZYxhZnY/PSvpkb9LmVA1oTYuOLf4WHe8C9sGFHPYRbks8yZ2m7JXK0dc8WG1ThnGXn 4J92Tn2fBzb2C34JoJBl5VLZUy9UvGEMujybT/pq1ibH68wZr/SEtCK5XfeFo7Lne2sM ELe51FCQCYnYbeEY7gKddBn0QiJBIaCDG5iNuab6SAS30Aso6T9306nRJ6MlHgmSB6Dh xQ9w== X-Gm-Message-State: AOAM530isE0yfNbLVaSYwhmPtKDCzkHPETCxJj7CFkXF19KklBWVj+lP dm/OYHmwoQ4893jZXKMNQCUPv/nVPKc= X-Google-Smtp-Source: ABdhPJw0KQBWxfEg6MW3XHMuCpJ8N/VC1GdEPhgtQ3hUqPmQygvBvYI/pWDWWZ4plnkVJixpLDDJkg== X-Received: by 2002:a1c:2c0b:: with SMTP id s11mr5800716wms.13.1611789740220; Wed, 27 Jan 2021 15:22:20 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 5/5] target/sh4: Remove unused definitions Date: Thu, 28 Jan 2021 00:21:51 +0100 Message-Id: <20210127232151.3523581-6-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210127232151.3523581-1-f4bug@amsat.org> References: <20210127232151.3523581-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::32b; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32b.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: Richard Henderson , Joe Komlodi , Yoshinori Sato , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Remove these confusing and unused definitions. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/sh4/cpu.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 714e3b56413..01c43440822 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -271,17 +271,6 @@ typedef SuperHCPU ArchCPU; =20 #include "exec/cpu-all.h" =20 -/* Memory access type */ -enum { - /* Privilege */ - ACCESS_PRIV =3D 0x01, - /* Direction */ - ACCESS_WRITE =3D 0x02, - /* Type of instruction */ - ACCESS_CODE =3D 0x10, - ACCESS_INT =3D 0x20 -}; - /* MMU control register */ #define MMUCR 0x1F000010 #define MMUCR_AT (1<<0) --=20 2.26.2