ARM: Explain workaround for faulty ISAR0 register on B15
PATCH 1/1 ARM: Explain workaround for faulty ISAR0 register on B15
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.
---
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(+)
arch/arm/mm/proc-v7.S +5 -0
@@ -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
Signature · 1 line
1.8.3.2
Quoted 6 lines · Gregory Fong
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.
NAK myself here. Brian Norris pointed out that this is incorrect, and he'll send a follow-up patch to remove the forced hwcaps. Sorry for the noise.
Regards,
Gregory
PATCH 1/1 ARM: drop ISAR0 workaround for B15
In reply to Gregory FongThe Brahma-B15's ISAR0 correcty advertises UDIV/SDIV support in both ARM and Thumb2 modes (CPUID_EXT_ISAR0=02101110), so we don't need to manually apply this hwcap.
The code in question actually predates the following commit, which made our hwcaps unnecessary:
commit 8164f7af88d9ad3a757bd14f634b23997ee77f6b
Author: Stephen Boyd <[email protected]>
Date: Mon Mar 18 19:44:15 2013 +0100
ARM: 7680/1: Detect support for SDIV/UDIV from ISAR0 register
---
Supersedes Gregory's previous patch.
This addresses some very old review comments from Mark and Will:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225895.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/227916.html
arch/arm/mm/proc-v7.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mm/proc-v7.S +1 -1
@@ -570,7 +570,7 @@ __v7_ca15mp_proc_info: __v7_b15mp_proc_info: .long 0x420f00f0 .long 0xff0ffff0 - __v7_proc __v7_b15mp_setup, hwcaps = HWCAP_IDIV + __v7_proc __v7_b15mp_setup .size __v7_b15mp_proc_info, . - __v7_b15mp_proc_info /*
Signature · 1 line
1.9.1
Re: [PATCH] ARM: drop ISAR0 workaround for B15
Ping.
Is this worthy of 3.17-rc? Or should it just be queued for 3.18, as it's only removing redundant info?
Quoted 40 lines · Brian Norris
The Brahma-B15's ISAR0 correcty advertises UDIV/SDIV support in both ARM and Thumb2 modes (CPUID_EXT_ISAR0=02101110), so we don't need to manually apply this hwcap.
The code in question actually predates the following commit, which made our hwcaps unnecessary:
commit
8164f7af88d9ad3a757bd14f634b23997ee77f6b
Author: Stephen Boyd <[email protected]>
Date: Mon Mar 18 19:44:15 2013 +0100ARM: 7680/1: Detect support for SDIV/UDIV from ISAR0 register
Signed-off-by Brian Norris <[email protected]>Cc Will Deacon <[email protected]>Cc Mark Rutland <[email protected]>---
Supersedes Gregory's previous patch.This addresses some very old review comments from Mark and Will:
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/225895.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-January/227916.htmlarch/arm/mm/proc-v7.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mm/proc-v7.S +1
-1@@ -570,7 +570,7 @@ __v7_ca15mp_proc_info: __v7_b15mp_proc_info: .long 0x420f00f0 .long 0xff0ffff0 - __v7_proc __v7_b15mp_setup, hwcaps = HWCAP_IDIV + __v7_proc __v7_b15mp_setup .size __v7_b15mp_proc_info, . - __v7_b15mp_proc_info /*
Re: [PATCH] ARM: drop ISAR0 workaround for B15
Quoted 4 lines · Brian Norris
Ping.
Is this worthy of 3.17-rc? Or should it just be queued for 3.18, as it's only removing redundant info?
Since it's not actually fixing anything, I don't think it qualifies as a fix. You can still put it into rmk's patch system though, as I don't see this conflicting with anything in the pipeline.
Will