]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
h8300: bit io fix
authorYoshinori Sato <ysato@users.sourceforge.jp>
Fri, 12 Jun 2015 08:57:24 +0000 (17:57 +0900)
committerYoshinori Sato <ysato@users.sourceforge.jp>
Tue, 20 Oct 2015 02:30:08 +0000 (11:30 +0900)
"WU" constraint required memory address.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
arch/h8300/include/asm/io.h

index 1d09b2f2e0fefd9625cd7e39f92e5e40dce2152f..bb837cded268446bbd67d7610daf374807d502bb 100644 (file)
@@ -36,20 +36,20 @@ static inline void ctrl_outl(unsigned long b, unsigned long addr)
        *(volatile unsigned long *)addr = b;
 }
 
-static inline void ctrl_bclr(int b, unsigned long addr)
+static inline void ctrl_bclr(int b, unsigned char *addr)
 {
        if (__builtin_constant_p(b))
-               __asm__("bclr %1,%0" : : "WU"(addr), "i"(b));
+               __asm__("bclr %1,%0" : "+WU"(*addr): "i"(b));
        else
-               __asm__("bclr %w1,%0" : : "WU"(addr), "r"(b));
+               __asm__("bclr %w1,%0" : "+WU"(*addr): "r"(b));
 }
 
-static inline void ctrl_bset(int b, unsigned long addr)
+static inline void ctrl_bset(int b, unsigned char *addr)
 {
        if (__builtin_constant_p(b))
-               __asm__("bset %1,%0" : : "WU"(addr), "i"(b));
+               __asm__("bset %1,%0" : "+WU"(*addr): "i"(b));
        else
-               __asm__("bset %w1,%0" : : "WU"(addr), "r"(b));
+               __asm__("bset %w1,%0" : "+WU"(*addr): "r"(b));
 }
 
 #endif /* __KERNEL__ */