diff options
Diffstat (limited to 'include/asm-xtensa/uaccess.h')
-rw-r--r-- | include/asm-xtensa/uaccess.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h index 06a22b83ba17..88a64e1144d5 100644 --- a/include/asm-xtensa/uaccess.h +++ b/include/asm-xtensa/uaccess.h | |||
@@ -154,35 +154,6 @@ | |||
154 | .Laccess_ok_\@: | 154 | .Laccess_ok_\@: |
155 | .endm | 155 | .endm |
156 | 156 | ||
157 | /* | ||
158 | * verify_area determines whether a memory access is allowed. It's | ||
159 | * mostly an unnecessary wrapper for access_ok, but we provide it as a | ||
160 | * duplicate of the verify_area() C inline function below. See the | ||
161 | * equivalent C version below for clarity. | ||
162 | * | ||
163 | * On error, verify_area branches to a label indicated by parameter | ||
164 | * <error>. This implies that the macro falls through to the next | ||
165 | * instruction on success. | ||
166 | * | ||
167 | * Note that we assume success is the common case, and we optimize the | ||
168 | * branch fall-through case on success. | ||
169 | * | ||
170 | * On Entry: | ||
171 | * <aa> register containing memory address | ||
172 | * <as> register containing memory size | ||
173 | * <at> temp register | ||
174 | * <error> label to branch to on error; implies fall-through | ||
175 | * macro on success | ||
176 | * On Exit: | ||
177 | * <aa> preserved | ||
178 | * <as> preserved | ||
179 | * <at> destroyed | ||
180 | */ | ||
181 | .macro verify_area aa, as, at, sp, error | ||
182 | access_ok \at, \aa, \as, \sp, \error | ||
183 | .endm | ||
184 | |||
185 | |||
186 | #else /* __ASSEMBLY__ not defined */ | 157 | #else /* __ASSEMBLY__ not defined */ |
187 | 158 | ||
188 | #include <linux/sched.h> | 159 | #include <linux/sched.h> |
@@ -211,11 +182,6 @@ | |||
211 | #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) | 182 | #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) |
212 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) | 183 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) |
213 | 184 | ||
214 | static inline int verify_area(int type, const void * addr, unsigned long size) | ||
215 | { | ||
216 | return access_ok(type,addr,size) ? 0 : -EFAULT; | ||
217 | } | ||
218 | |||
219 | /* | 185 | /* |
220 | * These are the main single-value transfer routines. They | 186 | * These are the main single-value transfer routines. They |
221 | * automatically use the right size if we just have the right pointer | 187 | * automatically use the right size if we just have the right pointer |