summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-01-29 17:06:31 +0300
committerRobert Jarzmik <robert.jarzmik@free.fr>2016-02-01 23:44:29 +0300
commit343c1cdbc81c0c7bef05380b10e5c880faf8fb4c (patch)
tree95ecdd48e17d9dad6739b8393cddc0e6bfa19b6a /arch/arm/mach-pxa/pxa3xx.c
parenta9a54caed96561d01f1d923df61bd11b71df4b93 (diff)
downloadlinux-343c1cdbc81c0c7bef05380b10e5c880faf8fb4c.tar.xz
ARM: pxa: fix building without IWMMXT
When CONFIG_IWMMXT, the pxa3xx and pxa27x suspend/resume code emits some xscale specific instructions, which are rejected by the assembler, because gcc is built with -march=armv5 -mtune=xscale and passes that option to the assembler: /tmp/cciHumzr.s:553: Error: selected processor does not support ARM mode `mra r2,r3,acc0' /tmp/cciHumzr.s:605: Error: selected processor does not support ARM mode `mar acc0,r2,r3' make[3]: *** [arch/arm/mach-pxa/pxa3xx.o] Error 1 /tmp/cci5MUNu.s:326: Error: selected processor does not support ARM mode `mra r2,r3,acc0' /tmp/cci5MUNu.s:367: Error: selected processor does not support ARM mode `mar acc0,r2,r3' make[3]: *** [arch/arm/mach-pxa/pxa27x.o] Error 1 Overriding with -Wa,-march=xscale no longer works, so instead I'm adding an explict ".arch_extension" directive in all four inline assembly statements, which should work even if they end up in a different order in the assembly output. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 1ba62be65f7c..126c265691f5 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -102,7 +102,8 @@ static void pxa3xx_cpu_pm_suspend(void)
#ifndef CONFIG_IWMMXT
u64 acc0;
- asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0));
+ asm volatile(".arch_extension xscale\n\t"
+ "mra %Q0, %R0, acc0" : "=r" (acc0));
#endif
/* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */
@@ -130,7 +131,8 @@ static void pxa3xx_cpu_pm_suspend(void)
AD3ER = 0;
#ifndef CONFIG_IWMMXT
- asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0));
+ asm volatile(".arch_extension xscale\n\t"
+ "mar acc0, %Q0, %R0" : "=r" (acc0));
#endif
}