aboutsummaryrefslogtreecommitdiff
path: root/include/asm-um
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-um')
-rw-r--r--include/asm-um/ldt-x86_64.h12
-rw-r--r--include/asm-um/smp.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h
index 175722a9116..96b35aada79 100644
--- a/include/asm-um/ldt-x86_64.h
+++ b/include/asm-um/ldt-x86_64.h
@@ -5,8 +5,8 @@
* Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
*/
-#ifndef __ASM_LDT_I386_H
-#define __ASM_LDT_I386_H
+#ifndef __ASM_LDT_X86_64_H
+#define __ASM_LDT_X86_64_H
#include "asm/semaphore.h"
#include "asm/arch/ldt.h"
@@ -39,11 +39,13 @@ typedef struct uml_ldt {
} uml_ldt_t;
/*
- * macros stolen from include/asm-i386/desc.h
+ * macros stolen from include/asm-x86_64/desc.h
*/
#define LDT_entry_a(info) \
((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))
+/* Don't allow setting of the lm bit. It is useless anyways because
+ * 64bit system calls require __USER_CS. */
#define LDT_entry_b(info) \
(((info)->base_addr & 0xff000000) | \
(((info)->base_addr & 0x00ff0000) >> 16) | \
@@ -54,6 +56,7 @@ typedef struct uml_ldt {
((info)->seg_32bit << 22) | \
((info)->limit_in_pages << 23) | \
((info)->useable << 20) | \
+ /* ((info)->lm << 21) | */ \
0x7000)
#define LDT_empty(info) (\
@@ -64,6 +67,7 @@ typedef struct uml_ldt {
(info)->seg_32bit == 0 && \
(info)->limit_in_pages == 0 && \
(info)->seg_not_present == 1 && \
- (info)->useable == 0 )
+ (info)->useable == 0 && \
+ (info)->lm == 0)
#endif
diff --git a/include/asm-um/smp.h b/include/asm-um/smp.h
index d879eba2b52..aeda6657f36 100644
--- a/include/asm-um/smp.h
+++ b/include/asm-um/smp.h
@@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigned int maxcpus)
{
}
+extern struct task_struct *idle_threads[NR_CPUS];
+
#endif
#endif