@@ -348,7 +348,7 @@ void exit_thread(void)
348348#ifndef CONFIG_SMP
349349 if (last_task_used_math == current ) {
350350#else
351- if ( current_thread_info () -> flags & _TIF_USEDFPU ) {
351+ if ( test_thread_flag ( TIF_USEDFPU ) ) {
352352#endif
353353 /* Keep process from leaving FPU in a bogon state. */
354354 put_psr (get_psr () | PSR_EF );
@@ -357,7 +357,7 @@ void exit_thread(void)
357357#ifndef CONFIG_SMP
358358 last_task_used_math = NULL ;
359359#else
360- current_thread_info () -> flags &= ~ _TIF_USEDFPU ;
360+ clear_thread_flag ( TIF_USEDFPU ) ;
361361#endif
362362 }
363363}
@@ -371,7 +371,7 @@ void flush_thread(void)
371371#ifndef CONFIG_SMP
372372 if (last_task_used_math == current ) {
373373#else
374- if ( current_thread_info () -> flags & _TIF_USEDFPU ) {
374+ if ( test_thread_flag ( TIF_USEDFPU ) ) {
375375#endif
376376 /* Clean the fpu. */
377377 put_psr (get_psr () | PSR_EF );
@@ -380,7 +380,7 @@ void flush_thread(void)
380380#ifndef CONFIG_SMP
381381 last_task_used_math = NULL ;
382382#else
383- current_thread_info () -> flags &= ~ _TIF_USEDFPU ;
383+ clear_thread_flag ( TIF_USEDFPU ) ;
384384#endif
385385 }
386386
@@ -466,13 +466,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
466466#ifndef CONFIG_SMP
467467 if (last_task_used_math == current ) {
468468#else
469- if ( current_thread_info () -> flags & _TIF_USEDFPU ) {
469+ if ( test_thread_flag ( TIF_USEDFPU ) ) {
470470#endif
471471 put_psr (get_psr () | PSR_EF );
472472 fpsave (& p -> thread .float_regs [0 ], & p -> thread .fsr ,
473473 & p -> thread .fpqueue [0 ], & p -> thread .fpqdepth );
474474#ifdef CONFIG_SMP
475- current_thread_info () -> flags &= ~ _TIF_USEDFPU ;
475+ clear_thread_flag ( TIF_USEDFPU ) ;
476476#endif
477477 }
478478
@@ -609,13 +609,13 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
609609 return 1 ;
610610 }
611611#ifdef CONFIG_SMP
612- if (current_thread_info () -> flags & _TIF_USEDFPU ) {
612+ if (test_thread_flag ( TIF_USEDFPU ) ) {
613613 put_psr (get_psr () | PSR_EF );
614614 fpsave (& current -> thread .float_regs [0 ], & current -> thread .fsr ,
615615 & current -> thread .fpqueue [0 ], & current -> thread .fpqdepth );
616616 if (regs != NULL ) {
617617 regs -> psr &= ~(PSR_EF );
618- current_thread_info () -> flags &= ~( _TIF_USEDFPU );
618+ clear_thread_flag ( TIF_USEDFPU );
619619 }
620620 }
621621#else
0 commit comments