summaryrefslogtreecommitdiffstats
path: root/arch/parisc/include/asm/ldcw.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-26 13:33:39 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-26 13:33:39 +0100
commit6715f728c8b080ab85db0f93f5d9fa6c7d9e906b (patch)
tree79229726e196fdfe48c6c117125cda7ef1eca4b4 /arch/parisc/include/asm/ldcw.h
parent6455931186bff407493135e74c5f32efd30860e2 (diff)
parent88343ee38d7ae55e39cda74c5d137cb2c454e66c (diff)
downloadlinux-6715f728c8b080ab85db0f93f5d9fa6c7d9e906b.tar.bz2
Merge tag 'asoc-v3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.19 There's a lot more fixes here than I'd like since I've been lax in sending things throughout the release cycle but there's only two in generic code and they've had quite some time to cook in -next so hopefully on balance are OK. The two generic fixes are a fix for crashes on capture DAIs in the compress code and a fix for error handling on probe failures which would have been harmless in the past but now oopses with the new dynamic probe code.
Diffstat (limited to 'arch/parisc/include/asm/ldcw.h')
-rw-r--r--arch/parisc/include/asm/ldcw.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/parisc/include/asm/ldcw.h b/arch/parisc/include/asm/ldcw.h
index d2d11b7055ba..8121aa6db2ff 100644
--- a/arch/parisc/include/asm/ldcw.h
+++ b/arch/parisc/include/asm/ldcw.h
@@ -33,11 +33,18 @@
#endif /*!CONFIG_PA20*/
-/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */
+/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*.
+ We don't explicitly expose that "*a" may be written as reload
+ fails to find a register in class R1_REGS when "a" needs to be
+ reloaded when generating 64-bit PIC code. Instead, we clobber
+ memory to indicate to the compiler that the assembly code reads
+ or writes to items other than those listed in the input and output
+ operands. This may pessimize the code somewhat but __ldcw is
+ usually used within code blocks surrounded by memory barriors. */
#define __ldcw(a) ({ \
unsigned __ret; \
- __asm__ __volatile__(__LDCW " 0(%2),%0" \
- : "=r" (__ret), "+m" (*(a)) : "r" (a)); \
+ __asm__ __volatile__(__LDCW " 0(%1),%0" \
+ : "=r" (__ret) : "r" (a) : "memory"); \
__ret; \
})