]> err.no Git - linux-2.6/blobdiff - include/asm-x86/desc.h
Merge branches 'release' and 'gpe-ack' into release
[linux-2.6] / include / asm-x86 / desc.h
index e17581ad882414de354651f11f2db9d49ad79d53..5b6a05d3a7712aa7b29b26a37aff2c843ba78819 100644 (file)
@@ -7,7 +7,8 @@
 #include <asm/mmu.h>
 #include <linux/smp.h>
 
-static inline void fill_ldt(struct desc_struct *desc, struct user_desc *info)
+static inline void fill_ldt(struct desc_struct *desc,
+                           const struct user_desc *info)
 {
        desc->limit0 = info->limit & 0x0ffff;
        desc->base0 = info->base_addr & 0x0000ffff;
@@ -275,10 +276,16 @@ static inline void load_LDT(mm_context_t *pc)
        preempt_enable();
 }
 
-static inline unsigned long get_desc_base(struct desc_struct *desc)
+static inline unsigned long get_desc_base(const struct desc_struct *desc)
 {
        return desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24);
 }
+
+static inline unsigned long get_desc_limit(const struct desc_struct *desc)
+{
+       return desc->limit0 | (desc->limit << 16);
+}
+
 static inline void _set_gate(int gate, unsigned type, void *addr,
                              unsigned dpl, unsigned ist, unsigned seg)
 {