Lines Matching refs:thread

65 static bool vfp_state_in_hw(unsigned int cpu, struct thread_info *thread)  in vfp_state_in_hw()  argument
68 if (thread->vfpstate.hard.cpu != cpu) in vfp_state_in_hw()
71 return vfp_current_hw_state[cpu] == &thread->vfpstate; in vfp_state_in_hw()
79 static void vfp_force_reload(unsigned int cpu, struct thread_info *thread) in vfp_force_reload() argument
81 if (vfp_state_in_hw(cpu, thread)) { in vfp_force_reload()
86 thread->vfpstate.hard.cpu = NR_CPUS; in vfp_force_reload()
93 static void vfp_thread_flush(struct thread_info *thread) in vfp_thread_flush() argument
95 union vfp_state *vfp = &thread->vfpstate; in vfp_thread_flush()
121 static void vfp_thread_exit(struct thread_info *thread) in vfp_thread_exit() argument
124 union vfp_state *vfp = &thread->vfpstate; in vfp_thread_exit()
132 static void vfp_thread_copy(struct thread_info *thread) in vfp_thread_copy() argument
137 thread->vfpstate = parent->vfpstate; in vfp_thread_copy()
139 thread->vfpstate.hard.cpu = NR_CPUS; in vfp_thread_copy()
168 struct thread_info *thread = v; in vfp_notifier() local
179 cpu = thread->cpu; in vfp_notifier()
198 vfp_thread_flush(thread); in vfp_notifier()
202 vfp_thread_exit(thread); in vfp_notifier()
206 vfp_thread_copy(thread); in vfp_notifier()
235 current->thread.error_code = 0; in vfp_raise_sigfpe()
236 current->thread.trap_no = 6; in vfp_raise_sigfpe()
529 void vfp_sync_hwstate(struct thread_info *thread) in vfp_sync_hwstate() argument
533 if (vfp_state_in_hw(cpu, thread)) { in vfp_sync_hwstate()
540 vfp_save_state(&thread->vfpstate, fpexc | FPEXC_EN); in vfp_sync_hwstate()
548 void vfp_flush_hwstate(struct thread_info *thread) in vfp_flush_hwstate() argument
552 vfp_force_reload(cpu, thread); in vfp_flush_hwstate()
564 struct thread_info *thread = current_thread_info(); in vfp_preserve_user_clear_hwstate() local
565 struct vfp_hard_struct *hwstate = &thread->vfpstate.hard; in vfp_preserve_user_clear_hwstate()
569 vfp_sync_hwstate(thread); in vfp_preserve_user_clear_hwstate()
593 vfp_flush_hwstate(thread); in vfp_preserve_user_clear_hwstate()
607 struct thread_info *thread = current_thread_info(); in vfp_restore_user_hwstate() local
608 struct vfp_hard_struct *hwstate = &thread->vfpstate.hard; in vfp_restore_user_hwstate()
613 vfp_flush_hwstate(thread); in vfp_restore_user_hwstate()
692 struct thread_info *thread = current_thread_info(); in kernel_neon_begin() local
711 if (vfp_state_in_hw(cpu, thread)) in kernel_neon_begin()
712 vfp_save_state(&thread->vfpstate, fpexc); in kernel_neon_begin()