Skip to contentSkip to conversation

arm: armv8 correct value passed to __asm_dcache_all

PATCH New Peng Fan 2 participants 2 messages Aug 6, 2015 – Sep 12, 2015 Arm (32-bit)

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 arm: armv8 correct value passed to __asm_dcache_all

From source code comments:
"x0: 0 flush & invalidate, 1 invalidate only"

Current value 0xffff can make invalidate work, since we only judge whether input value is 0 or not, see following code:
"

    tbz     w1, #0, 1f
    dc      isw, x9
    b       2f
1:  dc      cisw, x9      /* clean & invalidate by set/way */
2:  subs    x6, x6, #1    /* decrement the way */

"

Later we may add "2 clean only" support. So following the comments, correct value from 0xffff to 1.

Cc York Sun <[email protected]>
Cc Albert Aribaud <[email protected]>

---

Note:
The patch was done when I was reading the source code. Since I do not have a board support armv8, I do not test this patch on real board.

 arch/arm/cpu/armv8/cache.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv8/cache.S +1 -1
index d846236..ab8c089 100644
@@ -112,7 +112,7 @@ ENDPROC(__asm_flush_dcache_all)
 
 ENTRY(__asm_invalidate_dcache_all)
 	mov	x16, lr
-	mov	x0, #0xffff
+	mov	x0, #0x1
 	bl	__asm_dcache_all
 	mov	lr, x16
 	ret
Signature · 1 line
1.8.4
#1 lore raw

PATCH 1/1 arm: armv8 correct value passed to __asm_dcache_all

Hello Peng,

Quoted 46 lines · Peng Fan

From source code comments:
"x0: 0 flush & invalidate, 1 invalidate only"

Current value 0xffff can make invalidate work, since we only judge whether input value is 0 or not, see following code:
"

    tbz     w1, #0, 1f
    dc      isw, x9
    b       2f
1:  dc      cisw, x9      /* clean & invalidate by set/way */
2:  subs    x6, x6, #1    /* decrement the way */

"

Later we may add "2 clean only" support. So following the comments, correct value from 0xffff to 1.

Cc York Sun <[email protected]>
Cc Albert Aribaud <[email protected]>

---

Note:
The patch was done when I was reading the source code. Since I do not have a board support armv8, I do not test this patch on real board.

 arch/arm/cpu/armv8/cache.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv8/cache.S +1 -1
index d846236..ab8c089 100644
@@ -112,7 +112,7 @@ ENDPROC(__asm_flush_dcache_all)
 
 ENTRY(__asm_invalidate_dcache_all)
 	mov	x16, lr
-	mov	x0, #0xffff
+	mov	x0, #0x1
 	bl	__asm_dcache_all
 	mov	lr, x16
 	ret
Signature · 1 line
1.8.4

Applied to u-boot-arm/master, thanks!

Amicalement,

Signature · 1 line
Albert.