xref: /linux/arch/x86/um/asm/segment.h (revision b24413180f5600bcb3bb70fbed5cf186b60864bd)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
246ecca8aSAl Viro #ifndef __UM_SEGMENT_H
346ecca8aSAl Viro #define __UM_SEGMENT_H
446ecca8aSAl Viro 
546ecca8aSAl Viro extern int host_gdt_entry_tls_min;
646ecca8aSAl Viro 
746ecca8aSAl Viro #define GDT_ENTRY_TLS_ENTRIES 3
846ecca8aSAl Viro #define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min
946ecca8aSAl Viro #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
1046ecca8aSAl Viro 
11f8d65d27SRichard Weinberger typedef struct {
12f8d65d27SRichard Weinberger 	unsigned long seg;
13f8d65d27SRichard Weinberger } mm_segment_t;
14f8d65d27SRichard Weinberger 
15f8d65d27SRichard Weinberger #define MAKE_MM_SEG(s)	((mm_segment_t) { (s) })
16f8d65d27SRichard Weinberger #define KERNEL_DS	MAKE_MM_SEG(~0UL)
17f8d65d27SRichard Weinberger #define USER_DS		MAKE_MM_SEG(TASK_SIZE)
18f8d65d27SRichard Weinberger 
1946ecca8aSAl Viro #endif
20