1 From 3f698a1cf08cc02911cdb2ca3217be77eeba794b Mon Sep 17 00:00:00 2001
2 From: Kurt Mahan <kmahan@freescale.com>
3 Date: Tue, 27 Nov 2007 23:17:53 -0700
4 Subject: [PATCH] Change inline assembly memory params.
6 For various routines change how the assembly memory pointer
9 LTIBName: mcfv4e-inline-memory-params
10 Signed-off-by: Kurt Mahan <kmahan@freescale.com>
12 include/asm-m68k/bitops.h | 68 ++++++++++++++++++++++++++++++++++++++++++++-
13 1 files changed, 67 insertions(+), 1 deletions(-)
15 --- a/include/asm-m68k/bitops.h
16 +++ b/include/asm-m68k/bitops.h
17 @@ -465,7 +465,7 @@ static inline int ext2_find_next_bit(con
18 __constant_coldfire_test_and_set_bit(nr, vaddr) : \
19 __generic_coldfire_test_and_set_bit(nr, vaddr))
23 static __inline__ int __constant_coldfire_test_and_set_bit(int nr,
26 @@ -477,6 +477,17 @@ static __inline__ int __constant_coldfir
31 +static __inline__ int __constant_coldfire_test_and_set_bit(int nr,volatile void * vaddr)
34 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
35 + __asm__ __volatile__ ("bset %2,(%4); sne %0"
36 + : "=d" (retval), "=m" (*p)
37 + : "di" (nr & 7), "m" (*p), "a" (p));
42 static __inline__ int __generic_coldfire_test_and_set_bit(int nr,
44 @@ -496,6 +507,7 @@ static __inline__ int __generic_coldfire
45 __constant_coldfire_set_bit(nr, vaddr) : \
46 __generic_coldfire_set_bit(nr, vaddr))
49 static __inline__ void __constant_coldfire_set_bit(int nr,
52 @@ -503,6 +515,14 @@ static __inline__ void __constant_coldfi
53 __asm__ __volatile__ ("bset %1,%0"
54 : "+QUd" (*p) : "di" (nr & 7));
57 +static __inline__ void __constant_coldfire_set_bit(int nr, volatile void * vaddr)
59 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
60 + __asm__ __volatile__ ("bset %1,(%3)"
61 + : "=m" (*p) : "di" (nr & 7), "m" (*p), "a" (p));
65 static __inline__ void __generic_coldfire_set_bit(int nr, volatile void *vaddr)
67 @@ -518,6 +538,7 @@ static __inline__ void __generic_coldfir
68 __constant_coldfire_test_and_clear_bit(nr, vaddr) : \
69 __generic_coldfire_test_and_clear_bit(nr, vaddr))
72 static __inline__ int __constant_coldfire_test_and_clear_bit(int nr,
75 @@ -530,6 +551,19 @@ static __inline__ int __constant_coldfir
80 +static __inline__ int __constant_coldfire_test_and_clear_bit(int nr, volatile void *vaddr)
83 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
85 + __asm__ __volatile__ ("bclr %2,(%4); sne %0"
86 + : "=d" (retval), "=m" (*p)
87 + : "id" (nr & 7), "m" (*p), "a" (p));
93 static __inline__ int __generic_coldfire_test_and_clear_bit(int nr,
95 @@ -556,6 +590,7 @@ static __inline__ int __generic_coldfire
96 __constant_coldfire_clear_bit(nr, vaddr) : \
97 __generic_coldfire_clear_bit(nr, vaddr))
100 static __inline__ void __constant_coldfire_clear_bit(int nr,
101 volatile void *vaddr)
103 @@ -563,6 +598,14 @@ static __inline__ void __constant_coldfi
104 __asm__ __volatile__ ("bclr %1,%0"
105 : "+QUd" (*p) : "id" (nr & 7));
108 +static __inline__ void __constant_coldfire_clear_bit(int nr, volatile void * vaddr)
110 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
111 + __asm__ __volatile__ ("bclr %1,(%3)"
112 + : "=m" (*p) : "id" (nr & 7), "m" (*p), "a" (p));
116 static __inline__ void __generic_coldfire_clear_bit(int nr,
117 volatile void *vaddr)
118 @@ -579,6 +622,7 @@ static __inline__ void __generic_coldfir
119 __constant_coldfire_test_and_change_bit(nr, vaddr) : \
120 __generic_coldfire_test_and_change_bit(nr, vaddr))
123 static __inline__ int __constant_coldfire_test_and_change_bit(int nr,
124 volatile void *vaddr)
126 @@ -591,6 +635,19 @@ static __inline__ int __constant_coldfir
131 +static __inline__ int __constant_coldfire_test_and_change_bit(int nr, volatile void * vaddr)
134 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
136 + __asm__ __volatile__ ("bchg %2,(%4); sne %0"
137 + : "=d" (retval), "=m" (*p)
138 + : "id" (nr & 7), "m" (*p), "a" (p));
144 static __inline__ int __generic_coldfire_test_and_change_bit(int nr,
145 volatile void *vaddr)
146 @@ -612,6 +669,7 @@ static __inline__ int __generic_coldfire
147 __constant_coldfire_change_bit(nr, vaddr) : \
148 __generic_coldfire_change_bit(nr, vaddr))
151 static __inline__ void __constant_coldfire_change_bit(int nr,
152 volatile void *vaddr)
154 @@ -619,6 +677,14 @@ static __inline__ void __constant_coldfi
155 __asm__ __volatile__ ("bchg %1,%0"
156 : "+QUd" (*p) : "id" (nr & 7));
159 +static __inline__ void __constant_coldfire_change_bit(int nr, volatile void * vaddr)
161 + volatile char *p = &((volatile char *)vaddr)[(nr^31) >> 3];
162 + __asm__ __volatile__ ("bchg %1,(%3)"
163 + : "=m" (*p) : "id" (nr & 7), "m" (*p), "a" (p));
167 static __inline__ void __generic_coldfire_change_bit(int nr,
168 volatile void *vaddr)