]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-um/ldt.h
Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / include / asm-um / ldt.h
index 4466ff6de0fde32afdd449c7f10959563ecaef4d..52af512f5e7dcf272a73de968b709f900218e98d 100644 (file)
@@ -5,17 +5,13 @@
  * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
  */
 
-#ifndef __ASM_LDT_I386_H
-#define __ASM_LDT_I386_H
+#ifndef __ASM_LDT_H
+#define __ASM_LDT_H
 
-#include "asm/semaphore.h"
-#include "asm/arch/ldt.h"
+#include <linux/mutex.h>
+#include "asm/host_ldt.h"
 
-struct mmu_context_skas;
 extern void ldt_host_info(void);
-extern long init_new_ldt(struct mmu_context_skas * to_mm,
-                        struct mmu_context_skas * from_mm);
-extern void free_ldt(struct mmu_context_skas * mm);
 
 #define LDT_PAGES_MAX \
        ((LDT_ENTRIES * LDT_ENTRY_SIZE)/PAGE_SIZE)
@@ -31,44 +27,11 @@ struct ldt_entry {
 
 typedef struct uml_ldt {
        int entry_count;
-       struct semaphore semaphore;
+       struct mutex lock;
        union {
                struct ldt_entry * pages[LDT_PAGES_MAX];
                struct ldt_entry entries[LDT_DIRECT_ENTRIES];
-       };
+       } u;
 } uml_ldt_t;
 
-/*
- * macros stolen from include/asm-i386/desc.h
- */
-#define LDT_entry_a(info) \
-       ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))
-
-#define LDT_entry_b(info) \
-       (((info)->base_addr & 0xff000000) | \
-       (((info)->base_addr & 0x00ff0000) >> 16) | \
-       ((info)->limit & 0xf0000) | \
-       (((info)->read_exec_only ^ 1) << 9) | \
-       ((info)->contents << 10) | \
-       (((info)->seg_not_present ^ 1) << 15) | \
-       ((info)->seg_32bit << 22) | \
-       ((info)->limit_in_pages << 23) | \
-       ((info)->useable << 20) | \
-       0x7000)
-
-#define LDT_empty(info) (\
-       (info)->base_addr       == 0    && \
-       (info)->limit           == 0    && \
-       (info)->contents        == 0    && \
-       (info)->read_exec_only  == 1    && \
-       (info)->seg_32bit       == 0    && \
-       (info)->limit_in_pages  == 0    && \
-       (info)->seg_not_present == 1    && \
-       (info)->useable         == 0    )
-
-#endif
-#ifndef __UM_LDT_H
-#define __UM_LDT_H
-
-#include "asm/arch/ldt.h"
 #endif