diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2006-04-22 00:48:22 -0600 |
---|---|---|
committer | Kyle McMartin <kyle@hera.kernel.org> | 2006-06-27 23:28:32 +0000 |
commit | 64f495323c9a902b3e59fe0a588585102bb3b13e (patch) | |
tree | 202d6c0105b0348aadfa8761e7c3cf27a5e98db9 /include/asm-parisc/system.h | |
parent | f36f44de721db44b4c2944133c3c5c2e06f633f0 (diff) | |
download | kernel_samsung_aries-64f495323c9a902b3e59fe0a588585102bb3b13e.zip kernel_samsung_aries-64f495323c9a902b3e59fe0a588585102bb3b13e.tar.gz kernel_samsung_aries-64f495323c9a902b3e59fe0a588585102bb3b13e.tar.bz2 |
[PARISC] Ensure all ldcw uses are ldcw,co on pa2.0
ldcw,co should always be used on pa2.0, otherwise the strict cache
width alignment requirement is not relaxed.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'include/asm-parisc/system.h')
-rw-r--r-- | include/asm-parisc/system.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 8638761..5fe2d23 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h @@ -155,13 +155,14 @@ static inline void set_eiem(unsigned long val) type and dynamically select the 16-byte aligned int from the array for the semaphore. */ -#define __PA_LDCW_ALIGNMENT 16 -#define __ldcw_align(a) ({ \ - unsigned long __ret = (unsigned long) &(a)->lock[0]; \ - __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) & ~(__PA_LDCW_ALIGNMENT - 1); \ - (volatile unsigned int *) __ret; \ +#define __PA_LDCW_ALIGNMENT 16 +#define __ldcw_align(a) ({ \ + unsigned long __ret = (unsigned long) &(a)->lock[0]; \ + __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) \ + & ~(__PA_LDCW_ALIGNMENT - 1); \ + (volatile unsigned int *) __ret; \ }) -#define LDCW "ldcw" +#define __LDCW "ldcw" #else /*CONFIG_PA20*/ /* From: "Jim Hull" <jim.hull of hp.com> @@ -171,17 +172,18 @@ static inline void set_eiem(unsigned long val) they only require "natural" alignment (4-byte for ldcw, 8-byte for ldcd). */ -#define __PA_LDCW_ALIGNMENT 4 +#define __PA_LDCW_ALIGNMENT 4 #define __ldcw_align(a) ((volatile unsigned int *)a) -#define LDCW "ldcw,co" +#define __LDCW "ldcw,co" #endif /*!CONFIG_PA20*/ /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ -#define __ldcw(a) ({ \ - unsigned __ret; \ - __asm__ __volatile__(LDCW " 0(%1),%0" : "=r" (__ret) : "r" (a)); \ - __ret; \ +#define __ldcw(a) ({ \ + unsigned __ret; \ + __asm__ __volatile__(__LDCW " 0(%1),%0" \ + : "=r" (__ret) : "r" (a)); \ + __ret; \ }) #ifdef CONFIG_SMP |