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:
committed by
Ingo Molnar
parent
5af725026f
commit
80fbb69a8d
@@ -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 == ¤t->thread)
|
||||
load_TLS(t, cpu);
|
||||
|
||||
|
Reference in New Issue
Block a user