]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-xtensa/uaccess.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[linux-2.6-omap-h63xx.git] / include / asm-xtensa / uaccess.h
index 35576b25c7b2fe31ec6d1ef92c9cb9eea64b0034..d6352da05b10b9b29660b5121581dc44ae838423 100644 (file)
@@ -23,9 +23,8 @@
 
 #ifdef __ASSEMBLY__
 
-#define _ASMLANGUAGE
 #include <asm/current.h>
-#include <asm/offsets.h>
+#include <asm/asm-offsets.h>
 #include <asm/processor.h>
 
 /*
 .Laccess_ok_\@:
        .endm
 
-/*
- * verify_area determines whether a memory access is allowed.  It's
- * mostly an unnecessary wrapper for access_ok, but we provide it as a
- * duplicate of the verify_area() C inline function below.  See the
- * equivalent C version below for clarity.
- *
- * On error, verify_area branches to a label indicated by parameter
- * <error>.  This implies that the macro falls through to the next
- * instruction on success.
- *
- * Note that we assume success is the common case, and we optimize the
- * branch fall-through case on success.
- *
- * On Entry:
- *     <aa>    register containing memory address
- *     <as>    register containing memory size
- *     <at>    temp register
- *     <error> label to branch to on error; implies fall-through
- *             macro on success
- * On Exit:
- *     <aa>    preserved
- *     <as>    preserved
- *     <at>    destroyed
- */
-       .macro  verify_area     aa, as, at, sp, error
-       access_ok  \at, \aa, \as, \sp, \error
-       .endm
-
-
 #else /* __ASSEMBLY__ not defined */
 
 #include <linux/sched.h>
 #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size)))
 #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
 
-extern inline int verify_area(int type, const void * addr, unsigned long size)
-{
-       return access_ok(type,addr,size) ? 0 : -EFAULT;
-}
-
 /*
  * These are the main single-value transfer routines.  They
  * automatically use the right size if we just have the right pointer
@@ -464,7 +429,7 @@ __generic_copy_from_user(void *to, const void *from, unsigned long n)
  * success.
  */
 
-extern inline unsigned long
+static inline unsigned long
 __xtensa_clear_user(void *addr, unsigned long size)
 {
        if ( ! memset(addr, 0, size) )
@@ -472,7 +437,7 @@ __xtensa_clear_user(void *addr, unsigned long size)
        return 0;
 }
 
-extern inline unsigned long
+static inline unsigned long
 clear_user(void *addr, unsigned long size)
 {
        if (access_ok(VERIFY_WRITE, addr, size))
@@ -486,7 +451,7 @@ clear_user(void *addr, unsigned long size)
 extern long __strncpy_user(char *, const char *, long);
 #define __strncpy_from_user __strncpy_user
 
-extern inline long
+static inline long
 strncpy_from_user(char *dst, const char *src, long count)
 {
        if (access_ok(VERIFY_READ, src, 1))
@@ -502,7 +467,7 @@ strncpy_from_user(char *dst, const char *src, long count)
  */
 extern long __strnlen_user(const char *, long);
 
-extern inline long strnlen_user(const char *str, long len)
+static inline long strnlen_user(const char *str, long len)
 {
        unsigned long top = __kernel_ok ? ~0UL : TASK_SIZE - 1;