]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/vdso/vma.c
x86: vdso: Fix build with older gcc
[karo-tx-linux.git] / arch / x86 / vdso / vma.c
index a280b11e2122b8b3fb006c542946e2b6a4ea523b..009495b9ab4bc52c0927accd29fe0b673cda5f7e 100644 (file)
@@ -230,7 +230,7 @@ __setup("vdso=", vdso_setup);
 static void vgetcpu_cpu_init(void *arg)
 {
        int cpu = smp_processor_id();
-       struct desc_struct d;
+       struct desc_struct d = { };
        unsigned long node = 0;
 #ifdef CONFIG_NUMA
        node = cpu_to_node(cpu);
@@ -243,15 +243,13 @@ static void vgetcpu_cpu_init(void *arg)
         * quickly in user space in vgetcpu. (12 bits for the CPU
         * and 8 bits for the node)
         */
-       d = (struct desc_struct) {
-               .limit0 = cpu | ((node & 0xf) << 12),
-               .limit = node >> 4,
-               .type = 5,              /* RO data, expand down, accessed */
-               .dpl = 3,               /* Visible to user code */
-               .s = 1,                 /* Not a system segment */
-               .p = 1,                 /* Present */
-               .d = 1,                 /* 32-bit */
-       };
+       d.limit0 = cpu | ((node & 0xf) << 12);
+       d.limit = node >> 4;
+       d.type = 5;             /* RO data, expand down, accessed */
+       d.dpl = 3;              /* Visible to user code */
+       d.s = 1;                /* Not a system segment */
+       d.p = 1;                /* Present */
+       d.d = 1;                /* 32-bit */
 
        write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_PER_CPU, &d, DESCTYPE_S);
 }