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

@ -223,8 +223,7 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
}
}
ldt.a = LDT_entry_a(&ldt_info);
ldt.b = LDT_entry_b(&ldt_info);
fill_ldt(&ldt, &ldt_info);
if (oldmode)
ldt.avl = 0;