From: gregory.0xf0@gmail.com (Gregory Fong)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Explain workaround for faulty ISAR0 register on B15
Date: Mon, 11 Aug 2014 15:44:13 -0700 [thread overview]
Message-ID: <1407797053-12544-1-git-send-email-gregory.0xf0@gmail.com> (raw)
The Brahma-B15 CPU design, like Krait, incorrectly indicates that it
only supports UDIV and SDIV instructions in Thumb mode when it
actually supports them in ARM and Thumb mode. This is apparently
because it follows the DDI0406B ARM ARM which has two values for the
divide instruction field, instead of the DDI0406C ARM ARM which has
three values.
Work around this problem by forcing the hwcaps to indicate support for
UDIV and SDIV in both ARM and Thumb modes.
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
---
Will and Mark had both asked whether Brahma-B15 has a wrong value for ISAR0:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225895.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/227916.html
This should clear up the matter, sorry it took so long!
arch/arm/mm/proc-v7.S | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index b5d67db..7706986 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -570,6 +570,11 @@ __v7_ca15mp_proc_info:
__v7_b15mp_proc_info:
.long 0x420f00f0
.long 0xff0ffff0
+ /*
+ * Brahma-B15 processors don't indicate support for SDIV and UDIV
+ * instructions in the ARM instruction set, even though they actually
+ * do support them.
+ */
__v7_proc __v7_b15mp_setup, hwcaps = HWCAP_IDIV
.size __v7_b15mp_proc_info, . - __v7_b15mp_proc_info
--
1.8.3.2
next reply other threads:[~2014-08-11 22:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 22:44 Gregory Fong [this message]
2014-08-13 18:53 ` [PATCH] ARM: Explain workaround for faulty ISAR0 register on B15 Gregory Fong
2014-08-13 19:40 ` [PATCH] ARM: drop ISAR0 workaround for B15 Brian Norris
2014-09-02 23:49 ` Brian Norris
2014-09-03 9:03 ` Will Deacon
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=1407797053-12544-1-git-send-email-gregory.0xf0@gmail.com \
--to=gregory.0xf0@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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).