Commit b9e72fef authored by Asit K. Mallick's avatar Asit K. Mallick Committed by David Mosberger

[PATCH] ia64: three more fph fixes (all UP-related)

parent 4af03459
...@@ -606,7 +606,6 @@ ia64_flush_fph (struct task_struct *task) ...@@ -606,7 +606,6 @@ ia64_flush_fph (struct task_struct *task)
task->thread.flags |= IA64_THREAD_FPH_VALID; task->thread.flags |= IA64_THREAD_FPH_VALID;
ia64_save_fpu(&task->thread.fph[0]); ia64_save_fpu(&task->thread.fph[0]);
} }
ia64_drop_fpu(task);
} }
/* /*
...@@ -627,6 +626,7 @@ ia64_sync_fph (struct task_struct *task) ...@@ -627,6 +626,7 @@ ia64_sync_fph (struct task_struct *task)
task->thread.flags |= IA64_THREAD_FPH_VALID; task->thread.flags |= IA64_THREAD_FPH_VALID;
memset(&task->thread.fph, 0, sizeof(task->thread.fph)); memset(&task->thread.fph, 0, sizeof(task->thread.fph));
} }
ia64_drop_fpu(task);
psr->dfh = 1; psr->dfh = 1;
} }
......
...@@ -779,6 +779,8 @@ cpu_init (void) ...@@ -779,6 +779,8 @@ cpu_init (void)
/* Clear the stack memory reserved for pt_regs: */ /* Clear the stack memory reserved for pt_regs: */
memset(ia64_task_regs(current), 0, sizeof(struct pt_regs)); memset(ia64_task_regs(current), 0, sizeof(struct pt_regs));
ia64_set_kr(IA64_KR_FPU_OWNER, 0);
/* /*
* Initialize default control register to defer all speculative faults. The * Initialize default control register to defer all speculative faults. The
* kernel MUST NOT depend on a particular setting of these bits (in other words, * kernel MUST NOT depend on a particular setting of these bits (in other words,
......
...@@ -250,7 +250,7 @@ disabled_fph_fault (struct pt_regs *regs) ...@@ -250,7 +250,7 @@ disabled_fph_fault (struct pt_regs *regs)
struct task_struct *fpu_owner struct task_struct *fpu_owner
= (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER); = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER);
if (fpu_owner == current) if (ia64_is_local_fpu_owner(current))
return; return;
if (fpu_owner) if (fpu_owner)
......
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