root/arch/unicore32/include/asm/uaccess.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0-only */
   2 /*
   3  * linux/arch/unicore32/include/asm/uaccess.h
   4  *
   5  * Code specific to PKUnity SoC and UniCore ISA
   6  *
   7  * Copyright (C) 2001-2010 GUAN Xue-tao
   8  */
   9 #ifndef __UNICORE_UACCESS_H__
  10 #define __UNICORE_UACCESS_H__
  11 
  12 #include <asm/memory.h>
  13 
  14 #define __strncpy_from_user     __strncpy_from_user
  15 #define __strnlen_user          __strnlen_user
  16 #define __clear_user            __clear_user
  17 
  18 #define __kernel_ok             (uaccess_kernel())
  19 #define __user_ok(addr, size)   (((size) <= TASK_SIZE)                  \
  20                                 && ((addr) <= TASK_SIZE - (size)))
  21 #define __access_ok(addr, size) (__kernel_ok || __user_ok((addr), (size)))
  22 
  23 extern unsigned long __must_check
  24 raw_copy_from_user(void *to, const void __user *from, unsigned long n);
  25 extern unsigned long __must_check
  26 raw_copy_to_user(void __user *to, const void *from, unsigned long n);
  27 extern unsigned long __must_check
  28 __clear_user(void __user *addr, unsigned long n);
  29 extern unsigned long __must_check
  30 __strncpy_from_user(char *to, const char __user *from, unsigned long count);
  31 extern unsigned long
  32 __strnlen_user(const char __user *s, long n);
  33 #define INLINE_COPY_FROM_USER
  34 #define INLINE_COPY_TO_USER
  35 
  36 #include <asm-generic/uaccess.h>
  37 
  38 #endif /* __UNICORE_UACCESS_H__ */

/* [<][>][^][v][top][bottom][index][help] */