Skip to content

Commit

Permalink
sh: Use the common segment definitions for the _64 uaccess routines.
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Jul 28, 2008
1 parent 66dfe18 commit 8524728
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions include/asm-sh/uaccess_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,6 @@
#define VERIFY_READ 0
#define VERIFY_WRITE 1

/*
* The fs value determines whether argument validity checking should be
* performed or not. If get_fs() == USER_DS, checking is performed, with
* get_fs() == KERNEL_DS, checking is bypassed.
*
* For historical reasons (Data Segment Register?), these macros are misnamed.
*/

#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })

#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
#define USER_DS MAKE_MM_SEG(0x80000000)

#define get_ds() (KERNEL_DS)
#define get_fs() (current_thread_info()->addr_limit)
#define set_fs(x) (current_thread_info()->addr_limit=(x))

#define segment_eq(a,b) ((a).seg == (b).seg)

#define __addr_ok(addr) ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg))

/*
Expand Down

0 comments on commit 8524728

Please sign in to comment.