Skip to content

Commit

Permalink
x86: use something common for both architectures.
Browse files Browse the repository at this point in the history
Using explicit hexa (0xFFFFFFUL) introduces an unnecessary difference
between i386 and x86_64 because of the size of their long. Use -1UL instead.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Jul 9, 2008
1 parent 1dc186e commit be9d06b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/asm-x86/uaccess_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })


#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFFUL)
#define KERNEL_DS MAKE_MM_SEG(-1UL)
#define USER_DS MAKE_MM_SEG(PAGE_OFFSET)

#define get_ds() (KERNEL_DS)
Expand Down
2 changes: 1 addition & 1 deletion include/asm-x86/uaccess_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

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

#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFFFFFFFFFFUL)
#define KERNEL_DS MAKE_MM_SEG(-1UL)
#define USER_DS MAKE_MM_SEG(PAGE_OFFSET)

#define get_ds() (KERNEL_DS)
Expand Down

0 comments on commit be9d06b

Please sign in to comment.