patch-2.4.25 linux-2.4.25/include/asm-ia64/uaccess.h
Next file: linux-2.4.25/include/asm-ia64/xor.h
Previous file: linux-2.4.25/include/asm-ia64/tlb.h
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
2004-02-18 05:36:32.000000000 -0800
- Orig file:
linux-2.4.24/include/asm-ia64/uaccess.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.24/include/asm-ia64/uaccess.h linux-2.4.25/include/asm-ia64/uaccess.h
@@ -8,7 +8,7 @@
* addresses. Thus, we need to be careful not to let the user to
* trick us into accessing kernel memory that would normally be
* inaccessible. This code is also fairly performance sensitive,
- * so we want to spend as little time doing saftey checks as
+ * so we want to spend as little time doing safety checks as
* possible.
*
* To make matters a bit more interesting, these macros sometimes also
@@ -26,8 +26,8 @@
* associated and, if so, sets r8 to -EFAULT and clears r9 to 0 and
* then resumes execution at the continuation point.
*
- * Copyright (C) 1998, 1999, 2001 Hewlett-Packard Co
- * Copyright (C) 1998, 1999, 2001 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998, 1999, 2001, 2003 Hewlett-Packard Co
+ * David Mosberger-Tang <davidm@hpl.hp.com>
*/
#include <linux/errno.h>
@@ -56,8 +56,10 @@
* address TASK_SIZE is never valid. We also need to make sure that the address doesn't
* point inside the virtually mapped linear page table.
*/
-#define __access_ok(addr,size,segment) (((unsigned long) (addr)) <= (segment).seg \
- && ((segment).seg == KERNEL_DS.seg || rgn_offset((unsigned long) (addr)) < RGN_MAP_LIMIT))
+#define __access_ok(addr,size,segment) \
+ likely(((unsigned long) (addr)) <= (segment).seg \
+ && ((segment).seg == KERNEL_DS.seg \
+ || REGION_OFFSET((unsigned long) (addr)) < RGN_MAP_LIMIT))
#define access_ok(type,addr,size) __access_ok((addr),(size),get_fs())
static inline int
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)