From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 3/3] ARM: Work around faulty ISAR0 register in some Krait CPUs
Date: Mon, 18 Mar 2013 11:28:57 -0700 [thread overview]
Message-ID: <1363631337-13816-4-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1363631337-13816-1-git-send-email-sboyd@codeaurora.org>
From: Stepan Moskovchenko <stepanm@codeaurora.org>
Some early versions of the Krait CPU design incorrectly indicate
that they only support the UDIV and SDIV instructions in Thumb
mode when they actually support them in ARM and Thumb mode. It
seems that these CPUs follow the DDI0406B ARM ARM which has two
possible values for the divide instructions field, instead of the
DDI0406C document which has three possible values.
Work around this problem by checking the MIDR against Krait CPUs
with this faulty ISAR0 register and force the hwcaps to indicate
support in both modes.
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
[sboyd: Rewrote commit text to reflect real reasoning now that
we autodetect udiv/sdiv]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
arch/arm/mm/proc-v7.S | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index bcd3d48..f584d3f 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -434,6 +434,21 @@ __v7_ca15mp_proc_info:
.size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info
/*
+ * Qualcomm Inc. Krait processors.
+ */
+ .type __krait_proc_info, #object
+__krait_proc_info:
+ .long 0x510f0400 @ Required ID value
+ .long 0xff0ffc00 @ Mask for ID
+ /*
+ * Some Krait 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_setup, hwcaps = HWCAP_IDIV
+ .size __krait_proc_info, . - __krait_proc_info
+
+ /*
* Match any ARMv7 processor core.
*/
.type __v7_proc_info, #object
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-03-18 18:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 18:28 [PATCHv2 0/3] Detect UDIV/SDIV support from ISAR0 Stephen Boyd
2013-03-18 18:28 ` [PATCHv2 1/3] ARM: Clear IDIVT hwcap if CONFIG_ARM_THUMB=n Stephen Boyd
2013-03-18 18:28 ` [PATCHv2 2/3] ARM: Detect support for SDIV/UDIV from ISAR0 register Stephen Boyd
2013-04-18 9:10 ` Uwe Kleine-König
2013-05-06 9:30 ` [RFC PATCH] implement read_cpuid_ext for v7-M (Was: Re: [PATCHv2 2/3] ARM: Detect support for SDIV/UDIV from ISAR0) register Uwe Kleine-König
2013-05-06 17:31 ` Stephen Boyd
2013-05-07 9:22 ` Will Deacon
2013-05-07 9:35 ` Uwe Kleine-König
2013-05-07 9:52 ` Will Deacon
2013-05-07 10:56 ` Jonathan Austin
2013-05-07 12:40 ` Uwe Kleine-König
2013-05-07 12:54 ` Will Deacon
2013-05-07 10:30 ` Jonathan Austin
2013-03-18 18:28 ` Stephen Boyd [this message]
2013-03-18 18:34 ` [PATCHv2 3/3] ARM: Work around faulty ISAR0 register in some Krait CPUs Will Deacon
2013-03-18 18:46 ` Stephen Boyd
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=1363631337-13816-4-git-send-email-sboyd@codeaurora.org \
--to=sboyd@codeaurora.org \
--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).