修訂 | 01961b12bc71d6eb4d9bda3632d73bb6764b8e85 (tree) |
---|---|
時間 | 2022-07-20 18:47:17 |
作者 | Vladimir Murzin <vladimir.murzin@arm....> |
Commiter | Waldemar Brodkorb |
linuxthread/arm: Unlock ldrex/strex varsion of testandset for ARM_ARCH >= 7
Thomas has repored failure building ARM 32-bit systems for ARMv8 cores
/tmp/ccn8SFKU.s: Assembler messages:
/tmp/ccn8SFKU.s:162: Error: swp{b} use is obsoleted for ARMv8 and later
/tmp/ccn8SFKU.s:186: Error: swp{b} use is obsoleted for ARMv8 and later
/tmp/ccn8SFKU.s:203: Error: swp{b} use is obsoleted for ARMv8 and later
/tmp/ccn8SFKU.s:224: Error: swp{b} use is obsoleted for ARMv8 and later
make[1]: *** [Makerules:369: libpthread/linuxthreads/mutex.os] Error 1
This is due to libpthread/linuxthreads/sysdeps/arm/pt-machine.h which
uses the swp instruction that is not allowed on ARMv8.
All ARM_ARCH >= 7 support ldrex/strex instructions, so unlock
testandset() varaint for them.
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
@@ -28,7 +28,7 @@ | ||
28 | 28 | # define PT_EI __extern_always_inline |
29 | 29 | #endif |
30 | 30 | |
31 | -#if defined(__thumb2__) | |
31 | +#if __ARM_ARCH >= 7 || defined(__thumb2__) | |
32 | 32 | /* Spinlock implementation; required. */ |
33 | 33 | PT_EI long int |
34 | 34 | testandset (int *spinlock) |