From patchwork Tue May 29 10:49:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10434953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3A39602BF for ; Tue, 29 May 2018 10:57:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4283286C2 for ; Tue, 29 May 2018 10:57:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8D04286C6; Tue, 29 May 2018 10:57:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_FAKE, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6CF62286C2 for ; Tue, 29 May 2018 10:57:31 +0000 (UTC) Received: from localhost ([::1]:60120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcJm-00079q-Ki for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 May 2018 06:57:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcD1-0001KZ-4x for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNcCy-0003qG-Kd for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:31 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:36578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNcCy-0003pX-EP for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:28 -0400 Received: by mail-wm0-x232.google.com with SMTP id v131-v6so20045550wma.1 for ; Tue, 29 May 2018 03:50:28 -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=OFDO64WorRhLtOjEHoVu0sDIiP8txqRKXmJIrq1zCNY=; b=r4WIi361TvSGJ7uMLIh9KKKQQU0o4usaiyITRBHFAcTXJb+AF6pZKoEhQSx9F81RIl cV07QpzwWxXS8LT5EO7q8Lu8A3waDkYKQc8VYezRSoPfa0+NHSRsU6zfRau8a4c7ZElK LSJeHVYDVztMo8TQQzGRQbgJ4SIcSGuV61lJszwbDgp6NvrfAUYwN9h9Kg6FGPUR0slU qXbThhqi1bAhdmD8oZAqm4tl0lZoWtd1tzdunAPMNz+u8UKIBUjssrxcs3B0CWkgJZmM kLtY6EzMOoyOWEMJGF13//VD/WyXE54z1Bcpz9K32LeRonwiBuONnvN3if9rrmjjDDr6 BM/w== 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=OFDO64WorRhLtOjEHoVu0sDIiP8txqRKXmJIrq1zCNY=; b=c253C7avJKGJ7CHdbaY3mD4hYhm6nVeVaMDs+y+4/vXgrsFZThEtJGeaiAtYcmK/UY +7rgE225pFoUfP7N5fEAfUkmH+F87sP4zevi1MctFHmxDW5iB964r5E6ZtO/eSawe1O4 XGTjunhWD7mhbzm00ftaWJtsPAQ3NVSFORsp5iXdUc2UwE9QeJ4Hw3vAJ/QjQX74v+Bi D9RPTQID/87vtcNwbhk5qat0ib3aaxaG1Bbhyv3EJuWY2NZrNwXWJV4QUccYm49sAQWb tapXzLIkofz5V3cPybiyyvOjgMPbXZp/J5tBontCquAlabZmEDt+ltpwqjZCA4kKPmnz /dxg== X-Gm-Message-State: ALKqPwfrFUt8KetDCjRLuCpLWgsbdITH7m5fZhk45rxuaRKnevjOPV2M ifBcyUsME5DzEScZnPKp/Nd8jA== X-Google-Smtp-Source: ADUXVKIv6yjLYruK/NM9KRl1B8Xm9u2f1vtGyEwxtZcrEVlY5w+jsfWHVgVxX8q3GLi+fcpZaJiIlA== X-Received: by 2002:a2e:8184:: with SMTP id e4-v6mr5736231ljg.93.1527591027078; Tue, 29 May 2018 03:50:27 -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 u10-v6sm2260364ljh.23.2018.05.29.03.50.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:26 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:49:41 +0200 Message-Id: <20180529105011.1914-9-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::232 Subject: [Qemu-devel] [PULL v1 08/38] 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 Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- 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 = MICROBLAZE_CPU(cs); CPUMBState *env = &cpu->env; unsigned int hit; - unsigned int mmu_available; int r = 1; int prot; - mmu_available = 0; - if (cpu->cfg.use_mmu) { - mmu_available = 1; - if ((cpu->cfg.pvr == C_PVR_FULL) && - (env->pvr.regs[11] & PVR11_USE_MMU) != PVR11_USE_MMU) { - mmu_available = 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;