diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/desc.h | 5 | ||||
-rw-r--r-- | include/asm-x86/desc_32.h | 8 | ||||
-rw-r--r-- | include/asm-x86/desc_64.h | 9 |
3 files changed, 5 insertions, 17 deletions
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h index 99c4adc851e2..a6fdd7c7b6b2 100644 --- a/include/asm-x86/desc.h +++ b/include/asm-x86/desc.h @@ -69,6 +69,11 @@ static inline void load_LDT(mm_context_t *pc) preempt_enable(); } +static inline unsigned long get_desc_base(struct desc_struct *desc) +{ + return desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24); +} + #else /* * GET_DESC_BASE reads the descriptor base of the specified segment. diff --git a/include/asm-x86/desc_32.h b/include/asm-x86/desc_32.h index 01415ad35fdf..8450c2a99c3a 100644 --- a/include/asm-x86/desc_32.h +++ b/include/asm-x86/desc_32.h @@ -168,14 +168,6 @@ static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, const vo #define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr) -static inline unsigned long get_desc_base(unsigned long *desc) -{ - unsigned long base; - base = ((desc[0] >> 16) & 0x0000ffff) | - ((desc[1] << 16) & 0x00ff0000) | - (desc[1] & 0xff000000); - return base; -} #endif /* !__ASSEMBLY__ */ #endif diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h index 448f96ed973f..a7a6c301c6bc 100644 --- a/include/asm-x86/desc_64.h +++ b/include/asm-x86/desc_64.h @@ -156,15 +156,6 @@ static inline void load_TLS(struct thread_struct *t, unsigned int cpu) gdt[i] = t->tls_array[i]; } -static inline unsigned long get_desc_base(const void *ptr) -{ - const u32 *desc = ptr; - unsigned long base; - base = ((desc[0] >> 16) & 0x0000ffff) | - ((desc[1] << 16) & 0x00ff0000) | - (desc[1] & 0xff000000); - return base; -} #endif /* !__ASSEMBLY__ */ #endif |