summaryrefslogtreecommitdiff
path: root/include/asm-x86/desc.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 13:31:14 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:14 +0100
commitcc6978528cbd475d952e0eb5073375839dfb600e (patch)
tree96d07f0b08b08c0ebfaf8c73252316cb8c978652 /include/asm-x86/desc.h
parent26048d75e8d6c840742468667f4a7ab8c2df74c9 (diff)
x86: modify get_desc_base
This patch makes get_desc_base() receive a struct desc_struct, and then uses its internal fields to compute the base address. This is done at both i386 and x86_64, and then it is moved to common header Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/desc.h')
-rw-r--r--include/asm-x86/desc.h5
1 files changed, 5 insertions, 0 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.