aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/tls.c
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 07:31:13 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:31:13 -0500
commit80fbb69a8d1268ef48dfe21da80e68cb01922f31 (patch)
tree6cc2d5d0fdc40eb53f74e36c5557fa24f89edce0 /arch/x86/kernel/tls.c
parent5af725026fe902bf81f1b90b1b9d9ee4b9e1eb6a (diff)
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>
Diffstat (limited to 'arch/x86/kernel/tls.c')
-rw-r--r--arch/x86/kernel/tls.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c
index 67a377621b12..74d2b65a82eb 100644
--- a/arch/x86/kernel/tls.c
+++ b/arch/x86/kernel/tls.c
@@ -67,10 +67,9 @@ int do_set_thread_area(struct task_struct *p, int idx,
67 if (LDT_empty(&info)) { 67 if (LDT_empty(&info)) {
68 desc[0] = 0; 68 desc[0] = 0;
69 desc[1] = 0; 69 desc[1] = 0;
70 } else { 70 } else
71 desc[0] = LDT_entry_a(&info); 71 fill_ldt((struct desc_struct *)desc, &info);
72 desc[1] = LDT_entry_b(&info); 72
73 }
74 if (t == &current->thread) 73 if (t == &current->thread)
75 load_TLS(t, cpu); 74 load_TLS(t, cpu);
76 75