arch/arm: fix infinite loop in test and clean cache operations

Update the destination register to r15 (PC) for test and clean
operations, as specified by the ARM926EJ-S Technical Reference
Manual (TRM). Using the wrong destination register prevented the
loop condition from updating correctly, resulting in an infinite
loop.

Signed-off-by: Lwazi Dube <lwazeh@gmail.com>
This commit is contained in:
Lwazi Dube 2026-05-18 23:53:12 -04:00 committed by Xiang Xiao
parent 5349a5ab0c
commit 81dc339415

View file

@ -199,7 +199,7 @@ up_clean_dcache:
.type up_clean_dcache_all, function
up_clean_dcache_all:
mrc p15, 0, r0, c7, c10, 3
mrc p15, 0, r15, c7, c10, 3
bne up_clean_dcache_all
bx lr
.size up_clean_dcache_all, . - up_clean_dcache_all
@ -227,7 +227,7 @@ up_flush_dcache:
.type up_flush_dcache_all, function
up_flush_dcache_all:
mrc p15, 0, r0, c7, c14, 3
mrc p15, 0, r15, c7, c14, 3
bne up_flush_dcache_all
bx lr
.size up_flush_dcache_all, . - up_flush_dcache_all