aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-11-17 16:27:04 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2012-11-18 04:32:16 -0500
commit34fa78b59c52d1db3513db4c1a999db26b2e9ac2 (patch)
tree5ec3490852c70fada6e8cd8fdadef7f6980ad99a /arch/m68k
parentf4a75d2eb7b1e2206094b901be09adb31ba63681 (diff)
m68k: fix sigset_t accessor functions
The sigaddset/sigdelset/sigismember functions that are implemented with bitfield insn cannot allow the sigset argument to be placed in a data register since the sigset is wider than 32 bits. Remove the "d" constraint from the asm statements. The effect of the bug is that sending RT signals does not work, the signal number is truncated modulo 32. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/signal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68k/include/asm/signal.h b/arch/m68k/include/asm/signal.h
index 67e489d8d1bd..2df26b57c26a 100644
--- a/arch/m68k/include/asm/signal.h
+++ b/arch/m68k/include/asm/signal.h
@@ -41,7 +41,7 @@ struct k_sigaction {
41static inline void sigaddset(sigset_t *set, int _sig) 41static inline void sigaddset(sigset_t *set, int _sig)
42{ 42{
43 asm ("bfset %0{%1,#1}" 43 asm ("bfset %0{%1,#1}"
44 : "+od" (*set) 44 : "+o" (*set)
45 : "id" ((_sig - 1) ^ 31) 45 : "id" ((_sig - 1) ^ 31)
46 : "cc"); 46 : "cc");
47} 47}
@@ -49,7 +49,7 @@ static inline void sigaddset(sigset_t *set, int _sig)
49static inline void sigdelset(sigset_t *set, int _sig) 49static inline void sigdelset(sigset_t *set, int _sig)
50{ 50{
51 asm ("bfclr %0{%1,#1}" 51 asm ("bfclr %0{%1,#1}"
52 : "+od" (*set) 52 : "+o" (*set)
53 : "id" ((_sig - 1) ^ 31) 53 : "id" ((_sig - 1) ^ 31)
54 : "cc"); 54 : "cc");
55} 55}
@@ -65,7 +65,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)
65 int ret; 65 int ret;
66 asm ("bfextu %1{%2,#1},%0" 66 asm ("bfextu %1{%2,#1},%0"
67 : "=d" (ret) 67 : "=d" (ret)
68 : "od" (*set), "id" ((_sig-1) ^ 31) 68 : "o" (*set), "id" ((_sig-1) ^ 31)
69 : "cc"); 69 : "cc");
70 return ret; 70 return ret;
71} 71}