All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: alistai@xilinx.com, sai.pavan.boddu@xilinx.com,
	edgar.iglesias@xilinx.com
Subject: [Qemu-devel] [PULL v1 02/17] target-microblaze: Correct bit shift for the PVR0 version field
Date: Tue,  4 Jul 2017 11:54:33 +0200	[thread overview]
Message-ID: <1499162088-1562-3-git-send-email-edgar.iglesias@gmail.com> (raw)
In-Reply-To: <1499162088-1562-1-git-send-email-edgar.iglesias@gmail.com>

From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Correct bit shift for the PVR0 version field.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 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
 
-- 
2.7.4

  parent reply	other threads:[~2017-07-04  9:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04  9:54 [Qemu-devel] [PULL v1 00/17] Xilinx queue Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 01/17] disas/microblaze: Add missing 'const' attributes Edgar E. Iglesias
2017-07-04  9:54 ` Edgar E. Iglesias [this message]
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 03/17] target-microblaze: Don't hard code 0xb as initial MB version Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 04/17] target-microblaze: Add CPU versions 9.4, 9.5 and 9.6 Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 05/17] target-microblaze: Introduce a use-barrel property Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 06/17] target-microblaze: Introduce a use-div property Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 07/17] target-microblaze: Introduce a use-hw-mul property Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 08/17] target-microblaze: Introduce a use-msr-instr property Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 09/17] target-microblaze: Introduce a use-pcmp-instr property Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 10/17] target-microblaze: dec_barrel: Use bool instead of unsigned int Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 11/17] target-microblaze: dec_barrel: Use extract32 Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 12/17] target-microblaze: dec_barrel: Add braces around if-statements Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 13/17] target-microblaze: dec_barrel: Plug TCG temp leak Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 14/17] target-microblaze: dec_barrel: Add BSEFI Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 15/17] target-microblaze: dec_barrel: Add BSIFI Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 16/17] target-microblaze: Add CPU version 10.0 Edgar E. Iglesias
2017-07-04  9:54 ` [Qemu-devel] [PULL v1 17/17] xilinx-dp: Add support for the yuy2 video format Edgar E. Iglesias
2017-07-04 12:58 ` [Qemu-devel] [PULL v1 00/17] Xilinx queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499162088-1562-3-git-send-email-edgar.iglesias@gmail.com \
    --to=edgar.iglesias@gmail.com \
    --cc=alistai@xilinx.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sai.pavan.boddu@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.