diff options
Diffstat (limited to 'arch/x86/include/asm/desc.h')
| -rw-r--r-- | arch/x86/include/asm/desc.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index c993e9e0fed4..e8de2f6f5ca5 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h | |||
| @@ -291,11 +291,24 @@ static inline unsigned long get_desc_base(const struct desc_struct *desc) | |||
| 291 | return desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24); | 291 | return desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24); |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | static inline void set_desc_base(struct desc_struct *desc, unsigned long base) | ||
| 295 | { | ||
| 296 | desc->base0 = base & 0xffff; | ||
| 297 | desc->base1 = (base >> 16) & 0xff; | ||
| 298 | desc->base2 = (base >> 24) & 0xff; | ||
| 299 | } | ||
| 300 | |||
| 294 | static inline unsigned long get_desc_limit(const struct desc_struct *desc) | 301 | static inline unsigned long get_desc_limit(const struct desc_struct *desc) |
| 295 | { | 302 | { |
| 296 | return desc->limit0 | (desc->limit << 16); | 303 | return desc->limit0 | (desc->limit << 16); |
| 297 | } | 304 | } |
| 298 | 305 | ||
| 306 | static inline void set_desc_limit(struct desc_struct *desc, unsigned long limit) | ||
| 307 | { | ||
| 308 | desc->limit0 = limit & 0xffff; | ||
| 309 | desc->limit = (limit >> 16) & 0xf; | ||
| 310 | } | ||
| 311 | |||
| 299 | static inline void _set_gate(int gate, unsigned type, void *addr, | 312 | static inline void _set_gate(int gate, unsigned type, void *addr, |
| 300 | unsigned dpl, unsigned ist, unsigned seg) | 313 | unsigned dpl, unsigned ist, unsigned seg) |
| 301 | { | 314 | { |
