Skip to contentSkip to conversation

armv7m: cache: add invalidate_icache_all() stub

PATCH New Giulio Benetti 2 participants 4 messages Nov 20, 2019 – Dec 4, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv7m: cache: add invalidate_icache_all() stub

This commit:
https://gitlab.denx.de/u-boot/u-boot/commit/d409c962169bd293e39386d0ddfa64d5222a3be4
causes build failure with ICACHE enabled. This is due to missing invalidate_icache_all() stub. Let's add empty invalidate_icache_all() in the case where ICACHE is not enabled.

---
 arch/arm/cpu/armv7m/cache.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/cpu/armv7m/cache.c +5 -0
index 0ccd7519a1..e3c5edce7a 100644
@@ -337,6 +337,11 @@ void icache_disable(void)
 	isb();	/* subsequent instructions fetch see cache disable effect */
 }
 #else
+void invalidate_icache_all(void)
+{
+	return 0;
+}
+
 void icache_enable(void)
 {
 	return;
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 armv7m: cache: add invalidate_icache_all() stub

Hello,

Quoted 16 lines · Giulio Benetti

This commit:
https://gitlab.denx.de/u-boot/u-boot/commit/d409c962169bd293e39386d0ddfa64d5222a3be4
causes build failure with ICACHE enabled. This is due to missing invalidate_icache_all() stub. Let's add empty invalidate_icache_all() in the case where ICACHE is not enabled.

---
  arch/arm/cpu/armv7m/cache.c | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm/cpu/armv7m/cache.c +0 -0
index 0ccd7519a1..e3c5edce7a 100644

arch/arm/cpu/armv7m/cache.c void icache_disable(void) · line 342

Quoted 6 lines
arch/arm/cpu/armv7m/cache.c +3 -0
@@ -337,6 +337,11 @@ void icache_disable(void)
  	isb();	/* subsequent instructions fetch see cache disable effect */
  }
  #else
+void invalidate_icache_all(void)
+{
+	return 0;

This must return nothing instead of 0.
I'm going to send v2 patch.

Sorry for the noise

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
#2 lore raw

PATCH v2 1/1 armv7m: cache: add invalidate_icache_all() stub

In reply to Giulio Benetti

This commit:
https://gitlab.denx.de/u-boot/u-boot/commit/d409c962169bd293e39386d0ddfa64d5222a3be4
causes build failure with ICACHE enabled. This is due to missing invalidate_icache_all() stub. Let's add empty invalidate_icache_all() in the case where ICACHE is not enabled.

---
V1->V2:
* substitute 'return 0;' with 'return;' since function returns void

---
 arch/arm/cpu/armv7m/cache.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/cpu/armv7m/cache.c +5 -0
index 0ccd7519a1..87c2baa60d 100644
@@ -337,6 +337,11 @@ void icache_disable(void)
 	isb();	/* subsequent instructions fetch see cache disable effect */
 }
 #else
+void invalidate_icache_all(void)
+{
+	return;
+}
+
 void icache_enable(void)
 {
 	return;
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 1/1 armv7m: cache: add invalidate_icache_all() stub

Quoted 7 lines · Giulio Benetti

This commit:
https://gitlab.denx.de/u-boot/u-boot/commit/d409c962169bd293e39386d0ddfa64d5222a3be4
causes build failure with ICACHE enabled. This is due to missing invalidate_icache_all() stub. Let's add empty invalidate_icache_all() in the case where ICACHE is not enabled.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191203/2faee92f/attachment.sig>