aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2006-02-01 06:06:28 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:23 -0500
commit4cd7ed94428babb0cdbf08cc14c257e223186079 (patch)
treefd0b8740cefb9d7d8606a82f11f9004484b47fd9
parente5cf888631af95c8022d659d77fb595e0c3ac778 (diff)
[PATCH] uml: skas0-hold-own-ldt fixups for x86-64
In a recent fixup i386 code was copied raw to x86_64 subarch to make it compile again. Here there are some little fixups and resyncs needed for it (mainly for cleanliness sake) - I did an audit and found the rest of the code to be safe. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/asm-um/ldt-x86_64.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h
index 57159f12dde..96b35aada79 100644
--- a/include/asm-um/ldt-x86_64.h
+++ b/include/asm-um/ldt-x86_64.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