/* Sync the fph state of the task so that it can be manipulated through thread.fph. If necessary, f32-f127 are written back to thread.fph or, if the fph state hasn't been used before, thread.fph is cleared to zeroes. Also, access to f32-f127 is disabled to ensure that the task picks up the state from thread.fph when it executes again.  */
void ia64_sync_fph(struct task_struct *task)
/* Sync the fph state of the task so that it can be manipulated through thread.fph. If necessary, f32-f127 are written back to thread.fph or, if the fph state hasn't been used before, thread.fph is cleared to zeroes. Also, access to f32-f127 is disabled to ensure that the task picks up the state from thread.fph when it executes again.  */
void ia64_sync_fph(struct task_struct *task)
{
	struct ia64_psr *psr = ia64_psr(task_pt_regs(task));
	ia64_flush_fph(task);
	if (!(task->thread.flags & IA64_THREAD_FPH_VALID)) {
		task->thread.flags |= IA64_THREAD_FPH_VALID;
		memset(&task->thread.fph, 0, sizeof(task->thread.fph));
	}
	ia64_drop_fpu(task);
	psr->dfh = 1;
}