From 871480933a1c28f8a9fed4c4d34d06c439a7a422 Mon Sep 17 00:00:00 2001 From: Srikant Patnaik Date: Sun, 11 Jan 2015 12:28:04 +0530 Subject: Moved, renamed, and deleted files The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure. --- arch/sh/include/asm/uaccess_64.h | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 arch/sh/include/asm/uaccess_64.h (limited to 'arch/sh/include/asm/uaccess_64.h') diff --git a/arch/sh/include/asm/uaccess_64.h b/arch/sh/include/asm/uaccess_64.h new file mode 100644 index 00000000..56fd20b8 --- /dev/null +++ b/arch/sh/include/asm/uaccess_64.h @@ -0,0 +1,91 @@ +#ifndef __ASM_SH_UACCESS_64_H +#define __ASM_SH_UACCESS_64_H + +/* + * include/asm-sh/uaccess_64.h + * + * Copyright (C) 2000, 2001 Paolo Alberelli + * Copyright (C) 2003, 2004 Paul Mundt + * + * User space memory access functions + * + * Copyright (C) 1999 Niibe Yutaka + * + * Based on: + * MIPS implementation version 1.15 by + * Copyright (C) 1996, 1997, 1998 by Ralf Baechle + * and i386 version. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + +#define __get_user_size(x,ptr,size,retval) \ +do { \ + retval = 0; \ + switch (size) { \ + case 1: \ + retval = __get_user_asm_b((void *)&x, \ + (long)ptr); \ + break; \ + case 2: \ + retval = __get_user_asm_w((void *)&x, \ + (long)ptr); \ + break; \ + case 4: \ + retval = __get_user_asm_l((void *)&x, \ + (long)ptr); \ + break; \ + case 8: \ + retval = __get_user_asm_q((void *)&x, \ + (long)ptr); \ + break; \ + default: \ + __get_user_unknown(); \ + break; \ + } \ +} while (0) + +extern long __get_user_asm_b(void *, long); +extern long __get_user_asm_w(void *, long); +extern long __get_user_asm_l(void *, long); +extern long __get_user_asm_q(void *, long); +extern void __get_user_unknown(void); + +#define __put_user_size(x,ptr,size,retval) \ +do { \ + retval = 0; \ + switch (size) { \ + case 1: \ + retval = __put_user_asm_b((void *)&x, \ + (long)ptr); \ + break; \ + case 2: \ + retval = __put_user_asm_w((void *)&x, \ + (long)ptr); \ + break; \ + case 4: \ + retval = __put_user_asm_l((void *)&x, \ + (long)ptr); \ + break; \ + case 8: \ + retval = __put_user_asm_q((void *)&x, \ + (long)ptr); \ + break; \ + default: \ + __put_user_unknown(); \ + } \ +} while (0) + +extern long __put_user_asm_b(void *, long); +extern long __put_user_asm_w(void *, long); +extern long __put_user_asm_l(void *, long); +extern long __put_user_asm_q(void *, long); +extern void __put_user_unknown(void); + +extern long __strnlen_user(const char *__s, long __n); +extern int __strncpy_from_user(unsigned long __dest, + unsigned long __user __src, int __count); + +#endif /* __ASM_SH_UACCESS_64_H */ -- cgit