xref: /linux/arch/x86/um/asm/segment.h (revision 43cbf02e7ad51007af38f39c5b2abdc7a5d7f5aa)
1 #ifndef __UM_SEGMENT_H
2 #define __UM_SEGMENT_H
3 
4 extern int host_gdt_entry_tls_min;
5 
6 #define GDT_ENTRY_TLS_ENTRIES 3
7 #define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min
8 #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
9 
10 typedef struct {
11 	unsigned long seg;
12 } mm_segment_t;
13 
14 #define MAKE_MM_SEG(s)	((mm_segment_t) { (s) })
15 #define KERNEL_DS	MAKE_MM_SEG(~0UL)
16 #define USER_DS		MAKE_MM_SEG(TASK_SIZE)
17 
18 #endif
19