uaccess.h (a1515ec7204edca770c07929df8538fcdb03ad46) uaccess.h (08ee3a009f49ac160cf8df0b65aa7dc299c811b2)
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 03, 04 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2007 Maciej W. Rozycki

--- 341 unchanged lines hidden (view full) ---

350 " " __UA_ADDR " 2b, 4b \n" \
351 " .previous \n" \
352 : "=r" (__gu_err), "=&r" (__gu_tmp.l) \
353 : "0" (0), "r" (addr), "i" (-EFAULT)); \
354 \
355 (val) = __gu_tmp.t; \
356}
357
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 03, 04 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2007 Maciej W. Rozycki

--- 341 unchanged lines hidden (view full) ---

350 " " __UA_ADDR " 2b, 4b \n" \
351 " .previous \n" \
352 : "=r" (__gu_err), "=&r" (__gu_tmp.l) \
353 : "0" (0), "r" (addr), "i" (-EFAULT)); \
354 \
355 (val) = __gu_tmp.t; \
356}
357
358#define HAVE_GET_KERNEL_NOFAULT
359
360#define __get_kernel_nofault(dst, src, type, err_label) \
361do { \
362 int __gu_err; \
363 \
364 __get_kernel_common(*((type *)(dst)), sizeof(type), \
365 (__force type *)(src)); \
366 if (unlikely(__gu_err)) \
367 goto err_label; \
368} while (0)
369
358#ifndef CONFIG_EVA
359#define __put_kernel_common(ptr, size) __put_user_common(ptr, size)
360#else
361/*
362 * Kernel specific functions for EVA. We need to use normal load instructions
363 * to read data from kernel when operating in EVA mode. We use these macros to
364 * avoid redefining __get_data_asm for EVA.
365 */

--- 112 unchanged lines hidden (view full) ---

478 " .previous" \
479 : "=r" (__pu_err) \
480 : "0" (0), "r" (__pu_val), "r" (ptr), \
481 "i" (-EFAULT)); \
482}
483
484extern void __put_user_unknown(void);
485
370#ifndef CONFIG_EVA
371#define __put_kernel_common(ptr, size) __put_user_common(ptr, size)
372#else
373/*
374 * Kernel specific functions for EVA. We need to use normal load instructions
375 * to read data from kernel when operating in EVA mode. We use these macros to
376 * avoid redefining __get_data_asm for EVA.
377 */

--- 112 unchanged lines hidden (view full) ---

490 " .previous" \
491 : "=r" (__pu_err) \
492 : "0" (0), "r" (__pu_val), "r" (ptr), \
493 "i" (-EFAULT)); \
494}
495
496extern void __put_user_unknown(void);
497
498#define __put_kernel_nofault(dst, src, type, err_label) \
499do { \
500 type __pu_val; \
501 int __pu_err = 0; \
502 \
503 __pu_val = *(__force type *)(src); \
504 __put_kernel_common(((type *)(dst)), sizeof(type)); \
505 if (unlikely(__pu_err)) \
506 goto err_label; \
507} while (0)
508
509
486/*
487 * We're generating jump to subroutines which will be outside the range of
488 * jump instructions
489 */
490#ifdef MODULE
491#define __MODULE_JAL(destination) \
492 ".set\tnoat\n\t" \
493 __UA_LA "\t$1, " #destination "\n\t" \

--- 289 unchanged lines hidden ---
510/*
511 * We're generating jump to subroutines which will be outside the range of
512 * jump instructions
513 */
514#ifdef MODULE
515#define __MODULE_JAL(destination) \
516 ".set\tnoat\n\t" \
517 __UA_LA "\t$1, " #destination "\n\t" \

--- 289 unchanged lines hidden ---