Ignore:
Timestamp:
02/28/12 00:55:15 (15 months ago)
Author:
BrainSlayer
Message:

update to 3.2.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.2/arch/x86/kernel/process_64.c

    r18171 r18579  
    382382        struct tss_struct *tss = &per_cpu(init_tss, cpu); 
    383383        unsigned fsindex, gsindex; 
    384         bool preload_fpu; 
    385  
    386         /* 
    387          * If the task has used fpu the last 5 timeslices, just do a full 
    388          * restore of the math state immediately to avoid the trap; the 
    389          * chances of needing FPU soon are obviously high now 
    390          */ 
    391         preload_fpu = tsk_used_math(next_p) && next_p->fpu_counter > 5; 
    392  
    393         /* we're going to use this soon, after a few expensive things */ 
    394         if (preload_fpu) 
    395                 prefetch(next->fpu.state); 
     384        fpu_switch_t fpu; 
     385 
     386        fpu = switch_fpu_prepare(prev_p, next_p); 
    396387 
    397388        /* 
     
    422413 
    423414        load_TLS(next, cpu); 
    424  
    425         /* Must be after DS reload */ 
    426         __unlazy_fpu(prev_p); 
    427  
    428         /* Make sure cpu is ready for new context */ 
    429         if (preload_fpu) 
    430                 clts(); 
    431415 
    432416        /* 
     
    470454        prev->gsindex = gsindex; 
    471455 
     456        switch_fpu_finish(next_p, fpu); 
     457 
    472458        /* 
    473459         * Switch the PDA and FPU contexts. 
     
    487473                     task_thread_info(prev_p)->flags & _TIF_WORK_CTXSW_PREV)) 
    488474                __switch_to_xtra(prev_p, next_p, tss); 
    489  
    490         /* 
    491          * Preload the FPU context, now that we've determined that the 
    492          * task is likely to be using it.  
    493          */ 
    494         if (preload_fpu) 
    495                 __math_state_restore(); 
    496475 
    497476        return prev_p; 
Note: See TracChangeset for help on using the changeset viewer.