Skip to content

Commit b8179cf

Browse files
arndbgregkh
authored andcommitted
ARM: xscale: fix multi-cpu compilation
[ Upstream commit c7b6804 ] Building a combined ARMv4+XScale kernel produces these and other build failures: /tmp/copypage-xscale-3aa821.s: Assembler messages: /tmp/copypage-xscale-3aa821.s:167: Error: selected processor does not support `pld [r7,#0]' in ARM mode /tmp/copypage-xscale-3aa821.s:168: Error: selected processor does not support `pld [r7,#32]' in ARM mode /tmp/copypage-xscale-3aa821.s:169: Error: selected processor does not support `pld [r1,#0]' in ARM mode /tmp/copypage-xscale-3aa821.s:170: Error: selected processor does not support `pld [r1,#32]' in ARM mode /tmp/copypage-xscale-3aa821.s:171: Error: selected processor does not support `pld [r7,#64]' in ARM mode /tmp/copypage-xscale-3aa821.s:176: Error: selected processor does not support `ldrd r4,r5,[r7],#8' in ARM mode /tmp/copypage-xscale-3aa821.s:180: Error: selected processor does not support `strd r4,r5,[r1],#8' in ARM mode Add an explict .arch armv5 in the inline assembly to allow the ARMv5 specific instructions regardless of the compiler -march= target. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent cb2d2b9 commit b8179cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/arm/mm/copypage-xscale.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static void mc_copy_user_page(void *from, void *to)
4242
* when prefetching destination as well. (NP)
4343
*/
4444
asm volatile ("\
45+
.arch xscale \n\
4546
pld [%0, #0] \n\
4647
pld [%0, #32] \n\
4748
pld [%1, #0] \n\
@@ -106,8 +107,9 @@ void
106107
xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr)
107108
{
108109
void *ptr, *kaddr = kmap_atomic(page);
109-
asm volatile(
110-
"mov r1, %2 \n\
110+
asm volatile("\
111+
.arch xscale \n\
112+
mov r1, %2 \n\
111113
mov r2, #0 \n\
112114
mov r3, #0 \n\
113115
1: mov ip, %0 \n\

0 commit comments

Comments
 (0)