x86: introduce fill_ldt

This patch introduces fill_ldt(), which populates a ldt descriptor
from a user_desc in once, instead of relying in the LDT_entry_a and
LDT_entry_b macros

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>
This commit is contained in:
Glauber de Oliveira Costa
2008-01-30 13:31:13 +01:00
committed by Ingo Molnar
parent 5af725026f
commit 80fbb69a8d
6 changed files with 34 additions and 40 deletions

View File

@@ -67,10 +67,9 @@ int do_set_thread_area(struct task_struct *p, int idx,
if (LDT_empty(&info)) {
desc[0] = 0;
desc[1] = 0;
} else {
desc[0] = LDT_entry_a(&info);
desc[1] = LDT_entry_b(&info);
}
} else
fill_ldt((struct desc_struct *)desc, &info);
if (t == &current->thread)
load_TLS(t, cpu);