aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/vdso/vma.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
index a280b11e2122..009495b9ab4b 100644
--- a/arch/x86/vdso/vma.c
+++ b/arch/x86/vdso/vma.c
@@ -230,7 +230,7 @@ __setup("vdso=", vdso_setup);
230static void vgetcpu_cpu_init(void *arg) 230static void vgetcpu_cpu_init(void *arg)
231{ 231{
232 int cpu = smp_processor_id(); 232 int cpu = smp_processor_id();
233 struct desc_struct d; 233 struct desc_struct d = { };
234 unsigned long node = 0; 234 unsigned long node = 0;
235#ifdef CONFIG_NUMA 235#ifdef CONFIG_NUMA
236 node = cpu_to_node(cpu); 236 node = cpu_to_node(cpu);
@@ -243,15 +243,13 @@ static void vgetcpu_cpu_init(void *arg)
243 * quickly in user space in vgetcpu. (12 bits for the CPU 243 * quickly in user space in vgetcpu. (12 bits for the CPU
244 * and 8 bits for the node) 244 * and 8 bits for the node)
245 */ 245 */
246 d = (struct desc_struct) { 246 d.limit0 = cpu | ((node & 0xf) << 12);
247 .limit0 = cpu | ((node & 0xf) << 12), 247 d.limit = node >> 4;
248 .limit = node >> 4, 248 d.type = 5; /* RO data, expand down, accessed */
249 .type = 5, /* RO data, expand down, accessed */ 249 d.dpl = 3; /* Visible to user code */
250 .dpl = 3, /* Visible to user code */ 250 d.s = 1; /* Not a system segment */
251 .s = 1, /* Not a system segment */ 251 d.p = 1; /* Present */
252 .p = 1, /* Present */ 252 d.d = 1; /* 32-bit */
253 .d = 1, /* 32-bit */
254 };
255 253
256 write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_PER_CPU, &d, DESCTYPE_S); 254 write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_PER_CPU, &d, DESCTYPE_S);
257} 255}