Lines Matching refs:desc

16 static inline void fill_ldt(struct desc_struct *desc, const struct user_desc *info)  in fill_ldt()  argument
18 desc->limit0 = info->limit & 0x0ffff; in fill_ldt()
20 desc->base0 = (info->base_addr & 0x0000ffff); in fill_ldt()
21 desc->base1 = (info->base_addr & 0x00ff0000) >> 16; in fill_ldt()
23 desc->type = (info->read_exec_only ^ 1) << 1; in fill_ldt()
24 desc->type |= info->contents << 2; in fill_ldt()
26 desc->type |= 1; in fill_ldt()
28 desc->s = 1; in fill_ldt()
29 desc->dpl = 0x3; in fill_ldt()
30 desc->p = info->seg_not_present ^ 1; in fill_ldt()
31 desc->limit1 = (info->limit & 0xf0000) >> 16; in fill_ldt()
32 desc->avl = info->useable; in fill_ldt()
33 desc->d = info->seg_32bit; in fill_ldt()
34 desc->g = info->limit_in_pages; in fill_ldt()
36 desc->base2 = (info->base_addr & 0xff000000) >> 24; in fill_ldt()
41 desc->l = 0; in fill_ldt()
102 const u32 *desc = ptr; in desc_empty() local
104 return !(desc[0] | desc[1]); in desc_empty()
122 #define write_ldt_entry(dt, entry, desc) native_write_ldt_entry(dt, entry, desc) argument
123 #define write_gdt_entry(dt, entry, desc, type) native_write_gdt_entry(dt, entry, desc, type) argument
142 static inline void native_write_ldt_entry(struct desc_struct *ldt, int entry, const void *desc) in native_write_ldt_entry() argument
144 memcpy(&ldt[entry], desc, 8); in native_write_ldt_entry()
148 native_write_gdt_entry(struct desc_struct *gdt, int entry, const void *desc, int type) in native_write_gdt_entry() argument
158 memcpy(&gdt[entry], desc, size); in native_write_gdt_entry()
164 struct ldttss_desc *desc = d; in set_tssldt_descriptor() local
166 memset(desc, 0, sizeof(*desc)); in set_tssldt_descriptor()
168 desc->limit0 = (u16) size; in set_tssldt_descriptor()
169 desc->base0 = (u16) addr; in set_tssldt_descriptor()
170 desc->base1 = (addr >> 16) & 0xFF; in set_tssldt_descriptor()
171 desc->type = type; in set_tssldt_descriptor()
172 desc->p = 1; in set_tssldt_descriptor()
173 desc->limit1 = (size >> 16) & 0xF; in set_tssldt_descriptor()
174 desc->base2 = (addr >> 24) & 0xFF; in set_tssldt_descriptor()
176 desc->base3 = (u32) (addr >> 32); in set_tssldt_descriptor()
382 static inline unsigned long get_desc_base(const struct desc_struct *desc) in get_desc_base() argument
384 return (unsigned)(desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24)); in get_desc_base()
387 static inline void set_desc_base(struct desc_struct *desc, unsigned long base) in set_desc_base() argument
389 desc->base0 = base & 0xffff; in set_desc_base()
390 desc->base1 = (base >> 16) & 0xff; in set_desc_base()
391 desc->base2 = (base >> 24) & 0xff; in set_desc_base()
394 static inline unsigned long get_desc_limit(const struct desc_struct *desc) in get_desc_limit() argument
396 return desc->limit0 | (desc->limit1 << 16); in get_desc_limit()
399 static inline void set_desc_limit(struct desc_struct *desc, unsigned long limit) in set_desc_limit() argument
401 desc->limit0 = limit & 0xffff; in set_desc_limit()
402 desc->limit1 = (limit >> 16) & 0xf; in set_desc_limit()