aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/io_32.h34
1 files changed, 4 insertions, 30 deletions
diff --git a/arch/x86/include/asm/io_32.h b/arch/x86/include/asm/io_32.h
index e16b9dbef81a..72a6a4a930ae 100644
--- a/arch/x86/include/asm/io_32.h
+++ b/arch/x86/include/asm/io_32.h
@@ -120,47 +120,21 @@ static inline void slow_down_io(void)
120 120
121#endif 121#endif
122 122
123#define __BUILDIO(bwl, bw, type) \
124static inline void out##bwl(unsigned type value, int port) \
125{ \
126 out##bwl##_local(value, port); \
127} \
128 \
129static inline unsigned type in##bwl(int port) \
130{ \
131 return in##bwl##_local(port); \
132}
133
134#define BUILDIO(bwl, bw, type) \ 123#define BUILDIO(bwl, bw, type) \
135static inline void out##bwl##_local(unsigned type value, int port) \ 124static inline void out##bwl(unsigned type value, int port) \
136{ \ 125{ \
137 asm volatile("out" #bwl " %" #bw "0, %w1" \ 126 asm volatile("out" #bwl " %" #bw "0, %w1" \
138 : : "a"(value), "Nd"(port)); \ 127 : : "a"(value), "Nd"(port)); \
139} \ 128} \
140 \ 129 \
141static inline unsigned type in##bwl##_local(int port) \ 130static inline unsigned type in##bwl(int port) \
142{ \ 131{ \
143 unsigned type value; \ 132 unsigned type value; \
144 asm volatile("in" #bwl " %w1, %" #bw "0" \ 133 asm volatile("in" #bwl " %w1, %" #bw "0" \
145 : "=a"(value) : "Nd"(port)); \ 134 : "=a"(value) : "Nd"(port)); \
146 return value; \ 135 return value; \
147} \ 136} \
148 \ 137 \
149static inline void out##bwl##_local_p(unsigned type value, int port) \
150{ \
151 out##bwl##_local(value, port); \
152 slow_down_io(); \
153} \
154 \
155static inline unsigned type in##bwl##_local_p(int port) \
156{ \
157 unsigned type value = in##bwl##_local(port); \
158 slow_down_io(); \
159 return value; \
160} \
161 \
162__BUILDIO(bwl, bw, type) \
163 \
164static inline void out##bwl##_p(unsigned type value, int port) \ 138static inline void out##bwl##_p(unsigned type value, int port) \
165{ \ 139{ \
166 out##bwl(value, port); \ 140 out##bwl(value, port); \