score: add address space annotations
[safe/jmp/linux-2.6] / arch / score / include / asm / uaccess.h
1 #ifndef _ASM_SCORE_UACCESS_H
2 #define _ASM_SCORE_UACCESS_H
3 /*
4  * Copyright (C) 2006 Atmark Techno, Inc.
5  *
6  * This file is subject to the terms and conditions of the GNU General Public
7  * License. See the file "COPYING" in the main directory of this archive
8  * for more details.
9  */
10 struct pt_regs;
11 extern int fixup_exception(struct pt_regs *regs);
12
13 #ifndef __ASSEMBLY__
14
15 #define __range_ok(addr, size)                                  \
16         ((((unsigned long __force)(addr) >= 0x80000000)                 \
17         || ((unsigned long)(size) > 0x80000000)                 \
18         || (((unsigned long __force)(addr) + (unsigned long)(size)) > 0x80000000)))
19
20 #define __access_ok(addr, size) \
21         (__range_ok((addr), (size)) == 0)
22
23 #include <asm-generic/uaccess.h>
24
25 #endif /* __ASSEMBLY__ */
26
27 #endif /* _ASM_SCORE_UACCESS_H */