Skip to content

Commit 9f1984c

Browse files
agnersRussell King
authored andcommitted
ARM: 8929/1: use APSR_nzcv instead of r15 as mrc operand
LLVM's integrated assembler does not accept r15 as mrc operand. arch/arm/boot/compressed/head.S:1267:16: error: operand must be a register in range [r0, r14] or apsr_nzcv 1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate D cache ^ Use APSR_nzcv instead of r15. The GNU assembler supports this syntax since binutils 2.21 [0]. [0] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=db472d6ff0f438a21b357249a9b48e4b74498076 Signed-off-by: Stefan Agner <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent bebe668 commit 9f1984c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

arch/arm/boot/compressed/head.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ iflush:
12731273
__armv5tej_mmu_cache_flush:
12741274
tst r4, #1
12751275
movne pc, lr
1276-
1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate D cache
1276+
1: mrc p15, 0, APSR_nzcv, c7, c14, 3 @ test,clean,invalidate D cache
12771277
bne 1b
12781278
mcr p15, 0, r0, c7, c5, 0 @ flush I cache
12791279
mcr p15, 0, r0, c7, c10, 4 @ drain WB

arch/arm/mm/proc-arm1026.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ENTRY(arm1026_flush_kern_cache_all)
138138
mov ip, #0
139139
__flush_whole_cache:
140140
#ifndef CONFIG_CPU_DCACHE_DISABLE
141-
1: mrc p15, 0, r15, c7, c14, 3 @ test, clean, invalidate
141+
1: mrc p15, 0, APSR_nzcv, c7, c14, 3 @ test, clean, invalidate
142142
bne 1b
143143
#endif
144144
tst r2, #VM_EXEC
@@ -363,7 +363,7 @@ ENTRY(cpu_arm1026_switch_mm)
363363
#ifdef CONFIG_MMU
364364
mov r1, #0
365365
#ifndef CONFIG_CPU_DCACHE_DISABLE
366-
1: mrc p15, 0, r15, c7, c14, 3 @ test, clean, invalidate
366+
1: mrc p15, 0, APSR_nzcv, c7, c14, 3 @ test, clean, invalidate
367367
bne 1b
368368
#endif
369369
#ifndef CONFIG_CPU_ICACHE_DISABLE

arch/arm/mm/proc-arm926.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ __flush_whole_cache:
131131
#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
132132
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
133133
#else
134-
1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
134+
1: mrc p15, 0, APSR_nzcv, c7, c14, 3 @ test,clean,invalidate
135135
bne 1b
136136
#endif
137137
tst r2, #VM_EXEC
@@ -358,7 +358,7 @@ ENTRY(cpu_arm926_switch_mm)
358358
mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
359359
#else
360360
@ && 'Clean & Invalidate whole DCache'
361-
1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
361+
1: mrc p15, 0, APSR_nzcv, c7, c14, 3 @ test,clean,invalidate
362362
bne 1b
363363
#endif
364364
mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache

0 commit comments

Comments
 (0)