Skip to contentSkip to conversation

arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled

PATCH New Patrice Chotard 2 participants 3 messages Feb 24, 2021 – Mar 12, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled

From: Patrice Chotard <[email protected]>

Fix following compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled :

arch/arm/mach-stm32mp/cpu.c: In function ?early_enable_caches?:
arch/arm/mach-stm32mp/cpu.c:223:10: error: ?volatile struct arch_global_data? has no member named ?tlb_size?
223 | gd->arch.tlb_size = PGTABLE_SIZE;
| ^
arch/arm/mach-stm32mp/cpu.c:224:10: error: ?volatile struct arch_global_data? has no member named ?tlb_addr?
224 | gd->arch.tlb_addr = (unsigned long)&early_tlb;
| ^

---

 arch/arm/mach-stm32mp/cpu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/cpu.c +4 -2
index 3faa4ec18a..cd503b7294 100644
@@ -223,8 +223,10 @@ static void early_enable_caches(void)
 	if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
 		return;
 
-	gd->arch.tlb_size = PGTABLE_SIZE;
-	gd->arch.tlb_addr = (unsigned long)&early_tlb;
+	if (!(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))) {
+		gd->arch.tlb_size = PGTABLE_SIZE;
+		gd->arch.tlb_addr = (unsigned long)&early_tlb;
+	}
 
 	dcache_enable();
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled

Hi Patrice,

Quoted 13 lines · Patrice Chotard

From: Patrice Chotard <[email protected]>

Fix following compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled :

arch/arm/mach-stm32mp/cpu.c: In function ?early_enable_caches?:
arch/arm/mach-stm32mp/cpu.c:223:10: error: ?volatile struct arch_global_data? has no member named ?tlb_size?
223 | gd->arch.tlb_size = PGTABLE_SIZE;
| ^
arch/arm/mach-stm32mp/cpu.c:224:10: error: ?volatile struct arch_global_data? has no member named ?tlb_addr?
224 | gd->arch.tlb_addr = (unsigned long)&early_tlb;
| ^

Quoted 7 lines

---

  arch/arm/mach-stm32mp/cpu.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

Thanks
Patrick

#2 lore raw

PATCH 1/1 arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled

Hi

Quoted 25 lines · Patrick DELAUNAY

Hi Patrice,

Quoted 13 lines · Patrice Chotard

From: Patrice Chotard <[email protected]>

Fix following compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled :

arch/arm/mach-stm32mp/cpu.c: In function ?early_enable_caches?:
arch/arm/mach-stm32mp/cpu.c:223:10: error: ?volatile struct arch_global_data? has no member named ?tlb_size? ?? 223 |? gd->arch.tlb_size = PGTABLE_SIZE;
?????? |????????? ^
arch/arm/mach-stm32mp/cpu.c:224:10: error: ?volatile struct arch_global_data? has no member named ?tlb_addr? ?? 224 |? gd->arch.tlb_addr = (unsigned long)&early_tlb;
?????? |????????? ^

Quoted 7 lines

---

? arch/arm/mach-stm32mp/cpu.c | 6 ++++--
? 1 file changed, 4 insertions(+), 2 deletions(-)

Quoted 4 lines

Thanks
Patrick

Applied to u-boot-stm/next

Thanks

Patrice