X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-um%2Fldt.h;h=96f82a456ce6515b781b44ef676034d402af1cfb;hb=6f91fe88e4e28b40b4f08d99e0ea6d17b70e9567;hp=e908439d338aef6c881ea0f4d2e9e5476136295d;hpb=a670fcb43f01a67ef56176afc76e5d43d128b25c;p=linux-2.6 diff --git a/include/asm-um/ldt.h b/include/asm-um/ldt.h index e908439d33..96f82a456c 100644 --- a/include/asm-um/ldt.h +++ b/include/asm-um/ldt.h @@ -1,5 +1,41 @@ -#ifndef __UM_LDT_H -#define __UM_LDT_H +/* + * Copyright (C) 2004 Fujitsu Siemens Computers GmbH + * Licensed under the GPL + * + * Author: Bodo Stroesser + */ + +#ifndef __ASM_LDT_H +#define __ASM_LDT_H + +#include "asm/semaphore.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) +#define LDT_ENTRIES_PER_PAGE \ + (PAGE_SIZE/LDT_ENTRY_SIZE) +#define LDT_DIRECT_ENTRIES \ + ((LDT_PAGES_MAX*sizeof(void *))/LDT_ENTRY_SIZE) + +struct ldt_entry { + __u32 a; + __u32 b; +}; + +typedef struct uml_ldt { + int entry_count; + struct semaphore semaphore; + union { + struct ldt_entry * pages[LDT_PAGES_MAX]; + struct ldt_entry entries[LDT_DIRECT_ENTRIES]; + } u; +} uml_ldt_t; -#include "asm/arch/ldt.h" #endif