aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um/ldt-x86_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-um/ldt-x86_64.h')
-rw-r--r--include/asm-um/ldt-x86_64.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h
index 175722a91164..96b35aada79a 100644
--- a/include/asm-um/ldt-x86_64.h
+++ b/include/asm-um/ldt-x86_64.h
@@ -5,8 +5,8 @@
5 * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> 5 * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
6 */ 6 */
7 7
8#ifndef __ASM_LDT_I386_H 8#ifndef __ASM_LDT_X86_64_H
9#define __ASM_LDT_I386_H 9#define __ASM_LDT_X86_64_H
10 10
11#include "asm/semaphore.h" 11#include "asm/semaphore.h"
12#include "asm/arch/ldt.h" 12#include "asm/arch/ldt.h"
@@ -39,11 +39,13 @@ typedef struct uml_ldt {
39} uml_ldt_t; 39} uml_ldt_t;
40 40
41/* 41/*
42 * macros stolen from include/asm-i386/desc.h 42 * macros stolen from include/asm-x86_64/desc.h
43 */ 43 */
44#define LDT_entry_a(info) \ 44#define LDT_entry_a(info) \
45 ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) 45 ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))
46 46
47/* Don't allow setting of the lm bit. It is useless anyways because
48 * 64bit system calls require __USER_CS. */
47#define LDT_entry_b(info) \ 49#define LDT_entry_b(info) \
48 (((info)->base_addr & 0xff000000) | \ 50 (((info)->base_addr & 0xff000000) | \
49 (((info)->base_addr & 0x00ff0000) >> 16) | \ 51 (((info)->base_addr & 0x00ff0000) >> 16) | \
@@ -54,6 +56,7 @@ typedef struct uml_ldt {
54 ((info)->seg_32bit << 22) | \ 56 ((info)->seg_32bit << 22) | \
55 ((info)->limit_in_pages << 23) | \ 57 ((info)->limit_in_pages << 23) | \
56 ((info)->useable << 20) | \ 58 ((info)->useable << 20) | \
59 /* ((info)->lm << 21) | */ \
57 0x7000) 60 0x7000)
58 61
59#define LDT_empty(info) (\ 62#define LDT_empty(info) (\
@@ -64,6 +67,7 @@ typedef struct uml_ldt {
64 (info)->seg_32bit == 0 && \ 67 (info)->seg_32bit == 0 && \
65 (info)->limit_in_pages == 0 && \ 68 (info)->limit_in_pages == 0 && \
66 (info)->seg_not_present == 1 && \ 69 (info)->seg_not_present == 1 && \
67 (info)->useable == 0 ) 70 (info)->useable == 0 && \
71 (info)->lm == 0)
68 72
69#endif 73#endif