diff options
author | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2003-12-19 14:43:39 +0000 |
---|---|---|
committer | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2003-12-19 14:43:39 +0000 |
commit | ce423b5dfe323c86c1db29cfe17d1779c4da1829 (patch) | |
tree | de7355038d78c8c5c3e471a55fb13a1829cba3d3 /xenolinux-2.4.23-sparse/include/asm-xeno/desc.h | |
parent | 24e81789606925507a369a624941c7bbab793735 (diff) | |
download | xen-ce423b5dfe323c86c1db29cfe17d1779c4da1829.tar.gz xen-ce423b5dfe323c86c1db29cfe17d1779c4da1829.tar.bz2 xen-ce423b5dfe323c86c1db29cfe17d1779c4da1829.zip |
bitkeeper revision 1.652 (3fe30e9bTUfDAq9tTjwgWtCD2HXzcg)
Oops, forgot to rename xenolinux-2.4.22 to 2.4.23
Diffstat (limited to 'xenolinux-2.4.23-sparse/include/asm-xeno/desc.h')
-rw-r--r-- | xenolinux-2.4.23-sparse/include/asm-xeno/desc.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/xenolinux-2.4.23-sparse/include/asm-xeno/desc.h b/xenolinux-2.4.23-sparse/include/asm-xeno/desc.h new file mode 100644 index 0000000000..545b7f8256 --- /dev/null +++ b/xenolinux-2.4.23-sparse/include/asm-xeno/desc.h @@ -0,0 +1,41 @@ +#ifndef __ARCH_DESC_H +#define __ARCH_DESC_H + +#include <asm/ldt.h> + +#ifndef __ASSEMBLY__ + +struct desc_struct { + unsigned long a,b; +}; + +struct Xgt_desc_struct { + unsigned short size; + unsigned long address __attribute__((packed)); +}; + +extern struct desc_struct default_ldt[]; + +static inline void clear_LDT(void) +{ + /* + * NB. We load the default_ldt for lcall7/27 handling on demand, as + * it slows down context switching. Noone uses it anyway. + */ + queue_set_ldt(0, 0); +} + +static inline void load_LDT(struct mm_struct *mm) +{ + void *segments = mm->context.segments; + int count = 0; + + if ( unlikely(segments != NULL) ) + count = LDT_ENTRIES; + + queue_set_ldt((unsigned long)segments, count); +} + +#endif /* __ASSEMBLY__ */ + +#endif /* __ARCH_DESC_H__ */ |