[PATCH] bcm43xx: Fix array overrun in bcm43xx_geo_init
[linux-2.6/kmemtrace.git] / include / asm-um / ldt.h
blob96f82a456ce6515b781b44ef676034d402af1cfb
1 /*
2 * Copyright (C) 2004 Fujitsu Siemens Computers GmbH
3 * Licensed under the GPL
5 * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
6 */
8 #ifndef __ASM_LDT_H
9 #define __ASM_LDT_H
11 #include "asm/semaphore.h"
12 #include "asm/host_ldt.h"
14 struct mmu_context_skas;
15 extern void ldt_host_info(void);
16 extern long init_new_ldt(struct mmu_context_skas * to_mm,
17 struct mmu_context_skas * from_mm);
18 extern void free_ldt(struct mmu_context_skas * mm);
20 #define LDT_PAGES_MAX \
21 ((LDT_ENTRIES * LDT_ENTRY_SIZE)/PAGE_SIZE)
22 #define LDT_ENTRIES_PER_PAGE \
23 (PAGE_SIZE/LDT_ENTRY_SIZE)
24 #define LDT_DIRECT_ENTRIES \
25 ((LDT_PAGES_MAX*sizeof(void *))/LDT_ENTRY_SIZE)
27 struct ldt_entry {
28 __u32 a;
29 __u32 b;
32 typedef struct uml_ldt {
33 int entry_count;
34 struct semaphore semaphore;
35 union {
36 struct ldt_entry * pages[LDT_PAGES_MAX];
37 struct ldt_entry entries[LDT_DIRECT_ENTRIES];
38 } u;
39 } uml_ldt_t;
41 #endif