From nobody Thu Oct 30 15:21:19 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152580120493873.3137423086763; Tue, 8 May 2018 10:40:04 -0700 (PDT) Received: from localhost ([::1]:52592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG6an-0006D4-9n for importer@patchew.org; Tue, 08 May 2018 13:40:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fG6TB-00089f-Gh for qemu-devel@nongnu.org; Tue, 08 May 2018 13:32:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fG6TA-0005Jx-Iu for qemu-devel@nongnu.org; Tue, 08 May 2018 13:32:09 -0400 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:44878) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fG6TA-0005Jb-Bq for qemu-devel@nongnu.org; Tue, 08 May 2018 13:32:08 -0400 Received: by mail-lf0-x244.google.com with SMTP id h197-v6so47004804lfg.11 for ; Tue, 08 May 2018 10:32:08 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id c12-v6sm4865261lji.59.2018.05.08.10.32.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 May 2018 10:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3KUDo4dh/s/YhTgxTbAxINfl/AMfZjMpg+hhn9W3sRI=; b=Ku3wTrXwazGehnG7UCFIAUKanf/GQNCzb4eUvmf6Tz0nr2dVyGGil6TEOmu625ev0u hFgpxeekqsRNGR5x0TqHs87rKgm00MGzBjelUgcbgXLd/6/S0rOZwPkdeEGrkDJeJw4e EWf9NY+bQNLBxqXwuO4cq38kmmfPnZYuic6/Fjzh1KA46nZIiSjCi+ApnnmLYKu3J8KT HH1U+vZXAHz9G/VQ77u0WmIyOhali/SodTyPvpgI6hhLryZ8gXhkBiTRSYUaWRIXzLWd fAPbMCA+d6AGTFf73QPr0zq5qBzkF5pFaJojXy0CkzJODdvq12ogn8RpN0AYsdQsIlkH pgkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3KUDo4dh/s/YhTgxTbAxINfl/AMfZjMpg+hhn9W3sRI=; b=ezD7l1EFe/hSdB96VOXYDcWyqMB5C7dqwz+REDiBZs9JxOKz5uCE7S9fVyj8LGdPpE 1Ld5FGScvUvQlVmfb+DxgyLa0MJ13v1camB8rzIB/MnX5FQdm5z6lE2LujUwCuhQ5zPZ hB6z8Ws+qO+d04HAcDi5FdFgkCtAyWmvaYSQBZ1M68ciYU02fGCEEzSf7+n63/NtusP8 uT/q7V+YeGSGuWJZ5YDLWixKtDy9hJOfScheIYPCRhHihIVsnXV1Xb8/ULRcLLMt8ec/ g4YHGomeVO84E4JIskxBPgtJOneu0Oje/h48bogzaF3ONFX/lU+CNfkDUK73F6ybtkT2 uKLg== X-Gm-Message-State: ALKqPwcPTIdtCg6ey7BwDJQ2+ZOjuC0eEptrvEiB619YPziBfRrwdqV+ w0+i0xc1RheyimJQJTAVegQchw== X-Google-Smtp-Source: AB8JxZq/eiWBjz3Qc6jN7R7vEoPWziresSWRoBaK6DIVwx5OiHytD+iCIOOAfYPDcMPnwrmI/5j+Ow== X-Received: by 2002:a19:b257:: with SMTP id b84-v6mr5476145lff.84.1525800726845; Tue, 08 May 2018 10:32:06 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 8 May 2018 19:31:24 +0200 Message-Id: <20180508173152.29327-9-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180508173152.29327-1-edgar.iglesias@gmail.com> References: <20180508173152.29327-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 Subject: [Qemu-devel] [PATCH v2 08/36] target-microblaze: Remove USE_MMU PVR checks X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Edgar E. Iglesias" We already have a CPU property to control if a core has an MMU or not. Remove USE_MMU PVR checks in favor of looking at the property. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias Reviewed-by: Richard Henderson --- target/microblaze/helper.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index 387d4aca5a..a9f4ca93e3 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -54,21 +54,11 @@ int mb_cpu_handle_mmu_fault(CPUState *cs, vaddr address= , int size, int rw, MicroBlazeCPU *cpu =3D MICROBLAZE_CPU(cs); CPUMBState *env =3D &cpu->env; unsigned int hit; - unsigned int mmu_available; int r =3D 1; int prot; =20 - mmu_available =3D 0; - if (cpu->cfg.use_mmu) { - mmu_available =3D 1; - if ((cpu->cfg.pvr =3D=3D C_PVR_FULL) && - (env->pvr.regs[11] & PVR11_USE_MMU) !=3D PVR11_USE_MMU) { - mmu_available =3D 0; - } - } - /* Translate if the MMU is available and enabled. */ - if (mmu_available && (env->sregs[SR_MSR] & MSR_VM)) { + if (cpu->cfg.use_mmu && (env->sregs[SR_MSR] & MSR_VM)) { uint32_t vaddr, paddr; struct microblaze_mmu_lookup lu; =20 --=20 2.14.1