diff options
author | Richard Weinberger <richard@nod.at> | 2015-05-12 00:17:28 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-05-31 17:32:36 +0200 |
commit | f8d65d27e677da0ce33de570e3068308a77ed2b1 (patch) | |
tree | da725dd9a167adf8bfaaab016e5ce533ae2c4161 /arch/x86/um/asm/segment.h | |
parent | um: Add uaccess.h to ldt.c (diff) | |
download | linux-f8d65d27e677da0ce33de570e3068308a77ed2b1.tar.xz linux-f8d65d27e677da0ce33de570e3068308a77ed2b1.zip |
um: Rework uaccess code
Rework UML's uaccess code to reuse as much as possible
from asm-generic/uaccess.c.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/x86/um/asm/segment.h')
-rw-r--r-- | arch/x86/um/asm/segment.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/um/asm/segment.h b/arch/x86/um/asm/segment.h index 45183fcd10b6..41dd5e1f3cd7 100644 --- a/arch/x86/um/asm/segment.h +++ b/arch/x86/um/asm/segment.h @@ -7,4 +7,12 @@ extern int host_gdt_entry_tls_min; #define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1) +typedef struct { + unsigned long seg; +} mm_segment_t; + +#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) +#define KERNEL_DS MAKE_MM_SEG(~0UL) +#define USER_DS MAKE_MM_SEG(TASK_SIZE) + #endif |