Skip to contentSkip to conversation

arm: Add and select CONFIG_ARMV7

PATCH New Marek Vasut 3 participants 4 messages Dec 8, 2015 – Dec 10, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: Add and select CONFIG_ARMV7

The arch/arm/lib/cache-cp15.c checks for CONFIG_ARMV7 and if this macro is set, it configures TTBR0 register. This register must be configured for the cache on ARMv7 to operate correctly.

The problem is that noone actually sets the CONFIG_ARMV7 macro and thus the TTBR0 is not configured at all. On SoCFPGA, this produces all sorts of minor issues which are hard to replicate, for example certain USB sticks are not detected or QSPI NOR sometimes fails to write pages completely.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Simon Glass <[email protected]>
---
 arch/arm/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/Kconfig +5 -0
index fb9176b..c0ab947 100644
@@ -4,6 +4,9 @@ menu "ARM architecture"
 config SYS_ARCH
 	default "arm"
 
+config ARMV7
+	bool
+
 config ARM64
 	bool
 
@@ -34,11 +37,13 @@ config CPU_ARM1176
 
 config CPU_V7
         bool
+	select ARMV7
         select HAS_VBAR
         select HAS_THUMB2
 
 config CPU_V7M
 	bool
+	select ARMV7
         select HAS_THUMB2
 
 config CPU_PXA
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 arm: Add and select CONFIG_ARMV7

Quoted 9 lines · Marek Vasut

The arch/arm/lib/cache-cp15.c checks for CONFIG_ARMV7 and if this macro is set, it configures TTBR0 register. This register must be configured for the cache on ARMv7 to operate correctly.

The problem is that noone actually sets the CONFIG_ARMV7 macro and thus the TTBR0 is not configured at all. On SoCFPGA, this produces all sorts of minor issues which are hard to replicate, for example certain USB sticks are not detected or QSPI NOR sometimes fails to write pages completely.

Quoted 4 lines
Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Simon Glass <[email protected]>

Please ignore, after discussing this on IRC, we decided on doing s/CONFIG_ARMV7/CONFIG_CPU_V7/g instead.

Best regards,
Marek Vasut

#2 lore raw

PATCH 1/1 arm: Add and select CONFIG_ARMV7

Dear Marek,

Quoted 3 lines · In message <[email protected]> you wrote:

Please ignore, after discussing this on IRC, we decided on doing s/CONFIG_ARMV7/CONFIG_CPU_V7/g instead.

As IRC si (to the best or my knowledge?) not logged anywhere, I would like to hear the rationale for this decision.

Please correct me if I'm wrong, but AFAICT ARMv7 is an official name for a specific ARM architecture, so ARMV7 is something I will probably associate with the right thing.

Compared this to CPU_V7, which can be about anything - which CPU are we talking about here, please?

I still remember the ATWAV syndrome and how long it took to overcome it in code, so do we really have now a stage where we assume that all the world's an ARM ? [SCNR]

In short: Is there a chance to come up with a better name than CPU_V7?

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
... Jesus cried with a loud voice: Lazarus, come forth; the bug  hath
been  found  and  thy  program  runneth.  And  he  that was dead came
forth...                              -- John 11:43-44 [version 2.0?]
#3 lore raw

PATCH 1/1 arm: Add and select CONFIG_ARMV7

Quoted 9 lines · Wolfgang Denk

Dear Marek,

Quoted 3 lines · In message <[email protected]> you wrote:

Please ignore, after discussing this on IRC, we decided on doing s/CONFIG_ARMV7/CONFIG_CPU_V7/g instead.

As IRC si (to the best or my knowledge?) not logged anywhere, I would like to hear the rationale for this decision.

We're following Linux kernel convention and using the existing CPU_V7 option we have.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151209/097a1ed3/attachment.sig>