From patchwork Tue Jul 4 09:54:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 9824445 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 E7346602F0 for ; Tue, 4 Jul 2017 09:56:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D79CA28464 for ; Tue, 4 Jul 2017 09:56:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC584284D2; Tue, 4 Jul 2017 09:56:07 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 7C12D28464 for ; Tue, 4 Jul 2017 09:56:07 +0000 (UTC) Received: from localhost ([::1]:40013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSKYw-00024V-Ox for patchwork-qemu-devel@patchwork.kernel.org; Tue, 04 Jul 2017 05:56:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSKXo-00022K-Od for qemu-devel@nongnu.org; Tue, 04 Jul 2017 05:54:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSKXm-0000Vi-Li for qemu-devel@nongnu.org; Tue, 04 Jul 2017 05:54:56 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:35773) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSKXm-0000Uy-DU for qemu-devel@nongnu.org; Tue, 04 Jul 2017 05:54:54 -0400 Received: by mail-lf0-x243.google.com with SMTP id z78so4904185lff.2 for ; Tue, 04 Jul 2017 02:54:54 -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=odfOuIYWQ15q10Tr/CnkXEiuh4t6YA0KbZzRIUObE1A=; b=oNeaBx4ERBqVd/PBDPrKjds7ST6sWkXYKHiD8l/PLYm8Az7zF7XvHooUkIaZeYX0HO 7Kd3P8dTtIjJ1mciCY14CuiFocYcwEcPFXOCjF2Cl8IjaEMoVvW3BDZpvrGYfURXSzVt GGhEtf6iYgaSLWERYqei4KKWqw5GpXxEFj2+Qss4B3Hq/fZ8TveHnzVBHuNRaTvSwF/d paxrvBWFGiiie5iY+ybzyS5xL2OlOYKOB/yWiDWebwrbNxgEhGqq0Ii9J3GRiSvKPyYu laAShSw5dW6qltd2R+QCyFxuKeyn+l3MLWo5tM/DJg9/CR1CN6F0F1e3g70eJ6UwZ8WL 6Z5Q== 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=odfOuIYWQ15q10Tr/CnkXEiuh4t6YA0KbZzRIUObE1A=; b=baUUs8FBOVt6K2K1EGnK1Nzmti2559yS0faXGBAjTyDNLNvxNT9og0rUSTVfZhKoER mQdzi08MNCK1YTZmgF4ffrZ/MesmU1ltGWPuDFhVRghK3l3dvMJKzdnCg3wR8EVad/pB LUohHmUaZDr49KyGMwqrmPa50dapMqxA2uSd3hX8x/2uPOtsuUic3D/wc+0lbVjPfZW8 JVsElVoNpZHKQvwjqAjSTqB9uXEVQPdSJ0kjTUlUUL1ZwxgJlp1gSuQv/SYGslVtzWH4 f/OAqEaV85RG3mpoKt1sGCxvZrmb5lsJUquGzFQbdXgB+pw5OsGaHTYHeHa4XASIwimn 7QJQ== X-Gm-Message-State: AKS2vOz6M0/zFM8R3PbKp6iw2uuzOAKhwArE67X/s6hnujByPzzf4mDG qfcNEbfnI5BoK6Vs X-Received: by 10.46.69.137 with SMTP id s131mr10423010lja.31.1499162092800; Tue, 04 Jul 2017 02:54:52 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id e8sm3756843ljb.58.2017.07.04.02.54.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 02:54:52 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Tue, 4 Jul 2017 11:54:33 +0200 Message-Id: <1499162088-1562-3-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499162088-1562-1-git-send-email-edgar.iglesias@gmail.com> References: <1499162088-1562-1-git-send-email-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::243 Subject: [Qemu-devel] [PULL v1 02/17] target-microblaze: Correct bit shift for the PVR0 version field 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: sai.pavan.boddu@xilinx.com, edgar.iglesias@xilinx.com, alistai@xilinx.com 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" Correct bit shift for the PVR0 version field. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- target/microblaze/cpu.c | 2 +- target/microblaze/cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 3d58869..af70faa 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -182,7 +182,7 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **errp) (cpu->cfg.use_fpu ? PVR0_USE_FPU_MASK : 0) | (cpu->cfg.use_mmu ? PVR0_USE_MMU_MASK : 0) | (cpu->cfg.endi ? PVR0_ENDI_MASK : 0) | - (version_code << 16) | + (version_code << PVR0_VERSION_SHIFT) | (cpu->cfg.pvr == C_PVR_FULL ? PVR0_PVR_FULL_MASK : 0); env->pvr.regs[2] |= (cpu->cfg.use_fpu ? PVR2_USE_FPU_MASK : 0) | diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index bf6963b..68c33e8 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -129,6 +129,8 @@ typedef struct CPUMBState CPUMBState; #define PVR0_USER1_MASK 0x000000FF #define PVR0_SPROT_MASK 0x00000001 +#define PVR0_VERSION_SHIFT 8 + /* User 2 PVR mask */ #define PVR1_USER2_MASK 0xFFFFFFFF