Commit 8cd2562f authored by David Mosberger's avatar David Mosberger

ia64: Patch from Asit K. Mallick: fix a few places where last_fph_cpu

	wasn't updated and one place in the sigreturn path where
	the fph-owner wasn't set.
parent 4c5ece64
......@@ -589,6 +589,7 @@ ia64_flush_fph (struct task_struct *task)
psr->mfh = 0;
ia64_save_fpu(&task->thread.fph[0]);
task->thread.flags |= IA64_THREAD_FPH_VALID;
task->thread.last_fph_cpu = smp_processor_id();
}
}
......@@ -608,6 +609,7 @@ ia64_sync_fph (struct task_struct *task)
ia64_flush_fph(task);
if (!(task->thread.flags & IA64_THREAD_FPH_VALID)) {
task->thread.flags |= IA64_THREAD_FPH_VALID;
task->thread.last_fph_cpu = -1; /* force reload */
memset(&task->thread.fph, 0, sizeof(task->thread.fph));
}
#ifndef CONFIG_SMP
......
......@@ -142,8 +142,13 @@ restore_sigcontext (struct sigcontext *sc, struct sigscratch *scr)
__copy_from_user(current->thread.fph, &sc->sc_fr[32], 96*16);
psr->mfh = 0; /* drop signal handler's fph contents... */
if (!psr->dfh)
if (psr->dfh)
current->thread.last_fph_cpu = -1;
else {
__ia64_load_fpu(current->thread.fph);
ia64_set_fpu_owner(current);
current->thread.last_fph_cpu = smp_processor_id();
}
}
return err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment