[PATCH] i386: Implement "current" with the PDA
[pandora-kernel.git] / arch / i386 / kernel / cpu / common.c
index e476202..6958ae5 100644 (file)
@@ -651,6 +651,7 @@ __cpuinit int alloc_gdt(int cpu)
 struct i386_pda boot_pda = {
        ._pda = &boot_pda,
        .cpu_number = 0,
+       .pcurrent = &init_task,
 };
 
 static inline void set_kernel_gs(void)
@@ -696,6 +697,7 @@ __cpuinit int init_gdt(int cpu, struct task_struct *idle)
        memset(pda, 0, sizeof(*pda));
        pda->_pda = pda;
        pda->cpu_number = cpu;
+       pda->pcurrent = idle;
 
        return 1;
 }