Skip to contentSkip to conversation

85xx: Don't icbi when unlocking the cache

PATCH New Kumar Gala 2 participants 2 messages Feb 20, 2008 – Feb 28, 2008

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 85xx: Don't icbi when unlocking the cache

There is no reason to icbi when invalidating the temporary stack in the d-cache. Its impossible on e500 to have the i-cache contain any addresses in the temp stack and it can be problematic in generating transactions on the bus to non-valid addresses.

---

in git://git.kernel.org/pub/scm/boot/u-boot/galak/u-boot.git mpc85xx

 cpu/mpc85xx/start.S |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
cpu/mpc85xx/start.S +2 -5
index eb24dbc..f4c17f8 100644
@@ -992,7 +992,6 @@ trap_reloc:
 
 	blr
 
-#ifdef CFG_INIT_RAM_LOCK
 .globl unlock_ram_in_cache
 unlock_ram_in_cache:
 	/* invalidate the INIT_RAM section */
@@ -1002,11 +1001,9 @@ unlock_ram_in_cache:
 	andi.	r4,r4,0x1ff
 	slwi	r4,r4,(10 - 1 - L1_CACHE_SHIFT)
 	mtctr	r4
-1:	icbi	r0,r3
-	dcbi	r0,r3
+1:	dcbi	r0,r3
 	addi	r3,r3,CFG_CACHELINE_SIZE
 	bdnz	1b
-	sync			/* Wait for all icbi to complete on bus */
+	sync
 	isync
 	blr
-#endif
Signature · 1 line
1.5.3.8
Applied
#1 lore raw

PATCH 1/1 85xx: Don't icbi when unlocking the cache

Quoted 6 lines · Kumar Gala

There is no reason to icbi when invalidating the temporary stack in
the d-cache. Its impossible on e500 to have the i-cache contain any addresses in the temp stack and it can be problematic in generating transactions on the bus to non-valid addresses.

Applied, with changes required due to applying to the same spot as the INIT_RAM fix.

Thanks,
Andy