ARM: PXA: fix multi-cpu build of xsc3
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Apr 2022 21:38:28 +0000 (23:38 +0200)
committerArnd Bergmann <arnd@arndb.de>
Sat, 7 May 2022 20:56:16 +0000 (22:56 +0200)
On a kernel that includes both ARMv4 and XScale support,
the copypage function fails to build with invalid
instructions.

Since these are only called on an actual XScale processor,
annotate the assembly with the correct .arch directive.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mm/copypage-xsc3.c

index 6f0909d..c86e796 100644 (file)
@@ -29,6 +29,7 @@ static void xsc3_mc_copy_user_page(void *kto, const void *kfrom)
        int tmp;
 
        asm volatile ("\
+.arch xscale                                   \n\
        pld     [%1, #0]                        \n\
        pld     [%1, #32]                       \n\
 1:     pld     [%1, #64]                       \n\
@@ -80,6 +81,7 @@ void xsc3_mc_clear_user_highpage(struct page *page, unsigned long vaddr)
 {
        void *ptr, *kaddr = kmap_atomic(page);
        asm volatile ("\
+.arch xscale                                   \n\
        mov     r1, %2                          \n\
        mov     r2, #0                          \n\
        mov     r3, #0                          \n\