]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
1da177e4 LT |
2 | #ifndef __UM_SEGMENT_H |
3 | #define __UM_SEGMENT_H | |
4 | ||
3feb8856 PBG |
5 | extern int host_gdt_entry_tls_min; |
6 | ||
7 | #define GDT_ENTRY_TLS_ENTRIES 3 | |
8 | #define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min | |
9 | #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1) | |
aa6758d4 | 10 | |
f8d65d27 RW |
11 | typedef struct { |
12 | unsigned long seg; | |
13 | } mm_segment_t; | |
14 | ||
15 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | |
16 | #define KERNEL_DS MAKE_MM_SEG(~0UL) | |
17 | #define USER_DS MAKE_MM_SEG(TASK_SIZE) | |
18 | ||
1da177e4 | 19 | #endif |