From patchwork Tue May 29 10:49:42 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: 10434971 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 88395602BF for ; Tue, 29 May 2018 11:01:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78400286E2 for ; Tue, 29 May 2018 11:01:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D0A7286E4; Tue, 29 May 2018 11:01:15 +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 DF218286E2 for ; Tue, 29 May 2018 11:01:14 +0000 (UTC) Received: from localhost ([::1]:60137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcNO-00018X-4j for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 May 2018 07:01:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcD1-0001Ku-GU 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 1fNcD0-0003s0-Fl for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:31 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:35093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNcD0-0003qz-85 for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:30 -0400 Received: by mail-wr0-x241.google.com with SMTP id i14-v6so24683519wre.2 for ; Tue, 29 May 2018 03:50:30 -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=VzigYZUet4AJDxdyrVRlaGKoOJouMbYbYJj7AAEtr9o=; b=INuOouiIlN+z2NDB8n/080A7xW5TlBa1wFeUnCQcX0B8uiTZ52rCKQvqXkfxnafRUj MLmq16+9W2y3J667+I9pFK5Qx1Uv8SiizYIyZqwx57s2b9aSwvcmqHbgdLeDMqHY582J PgCk2YGVV+R1vWSAIzL8Z9kbXhYn7Q9lko3TwXEDw/nWyFznE14ez2JzffmkD+FNFztq wTFBSOQyWbU5DK6tYIu4JPuYoRM0GAvsbx2JJOxBhPFx9eGmCbLfcTJMtvztdqDuPqqY BPZYijvkX3TxC1RclfztzUi4uuL+9DqLttG8rVqxH9YL+/YrJkQ843LIFAX2195FJKSh rpdw== 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=VzigYZUet4AJDxdyrVRlaGKoOJouMbYbYJj7AAEtr9o=; b=nLjhPO8Id+8JZygpLUpLKGMlyQshzHZInShxiSYKC6KelQRZ/m2vElN2p8gaBcJKYN pDY682jFZhY/MdsbRDI/FPg782DHQNgW8fVlppqtSwGsqouaS3VLKvzH3jZiEyngASPj JsNoZF6mJJbK9L18Qp3KLNZ4hUVbRhZeVJjCzE8ji1S3K0h0tY8ry2kcWzFOb8eupizN GhMcYdN2P4Z9PLHRqVA7OCvkSk+a0dmaKC8w9ktzTyQ+TNlc6D4z9jTsfeqL9iIYRz/a NVFJD+DjlzldQik7NDqHJzhE4O08AgC6tJdt5ChvcIdeERyZ214A8E7RBAUJ1QQflGx0 uEkw== X-Gm-Message-State: ALKqPwfDCf1DU5t03lMNqikQe9gTCB0gSO3UkACdHXzYS1O0ur+V09LF MJSzn38dhYvBHFMnU9OZlL/qTA== X-Google-Smtp-Source: ADUXVKLeIBSNXc0FV9Q94xua1BcH0J97h4PnZGbZ142rVYqxO2UldpKwCY9k3MmZvCXxlcOGHPt+VQ== X-Received: by 2002:a19:5701:: with SMTP id l1-v6mr9004980lfb.32.1527591028803; Tue, 29 May 2018 03:50:28 -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 x134-v6sm419332lfd.0.2018.05.29.03.50.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:27 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:49:42 +0200 Message-Id: <20180529105011.1914-10-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:c0c::241 Subject: [Qemu-devel] [PULL v1 09/38] target-microblaze: Conditionalize setting of PVR11_USE_MMU 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" Conditionalize setting of PVR11_USE_MMU on the use_mmu CPU property, otherwise we may incorrectly advertise an MMU via PVR when the core in fact has none. Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 06476f6efc..a6f1ce6549 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -201,7 +201,8 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **errp) PVR5_DCACHE_WRITEBACK_MASK : 0; env->pvr.regs[10] = 0x0c000000; /* Default to spartan 3a dsp family. */ - env->pvr.regs[11] = PVR11_USE_MMU | (16 << 17); + env->pvr.regs[11] = (cpu->cfg.use_mmu ? PVR11_USE_MMU : 0) | + 16 << 17; mcc->parent_realize(dev, errp); }