From: Peng Fan <Peng.Fan@freescale.com>
To: xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@citrix.com>,
Peng.Fan@freescale.com,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 2/2] xen: arm: traps: correct cond
Date: Mon, 21 Sep 2015 15:07:56 +0800 [thread overview]
Message-ID: <1442819276-25437-1-git-send-email-Peng.Fan@freescale.com> (raw)
>From "G6.2.29 CPSR, Current Program Status Register" of Aarch64 ARM
and "B1.3.3 Program Status Registers (PSRs)" of ARMv7-A ARM:
"
IT[7:5] holds the base condition for the IT block. The base condition is
the top 3 bits of the condition code specified by the first
condition field of the IT instruction.
IT[4:0] encodes the size of the IT block, which is the number of
instructions that are to be conditionally executed, by the
position of the least significant 1 in this field. It also
encodes the value of the least significant bit of the condition
code for each instruction in the block.
"
So should be "cond = ( it >> 5 );" but not "cond = ( it >> 4 );"
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>
Cc: Julien Grall <julien.grall@citrix.com>
---
xen/arch/arm/traps.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 2e2b1f2..b2879b7 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1561,8 +1561,8 @@ static int check_conditional_instr(struct cpu_user_regs *regs,
if ( it == 0 )
return 1;
- /* The cond for this instruction works out as the top 4 bits. */
- cond = ( it >> 4 );
+ /* The cond for this instruction works out as the top 3 bits. */
+ cond = ( it >> 5 );
}
cpsr_cond = cpsr >> 28;
--
1.8.4
next reply other threads:[~2015-09-21 7:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 7:07 Peng Fan [this message]
2015-09-21 10:10 ` [PATCH 2/2] xen: arm: traps: correct cond Julien Grall
2015-09-21 9:08 ` Peng Fan
2015-09-21 10:33 ` Ian Campbell
2015-09-22 0:46 ` Peng Fan
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=1442819276-25437-1-git-send-email-Peng.Fan@freescale.com \
--to=peng.fan@freescale.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xen.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).