From 5c89aca4223bcaa383e5c38b71d3d04206157863 Mon Sep 17 00:00:00 2001 From: Paolo Galtieri Date: Tue, 29 Nov 2005 19:34:38 -0800 Subject: [PATCH] --- yaml --- r: 14807 b: refs/heads/master c: 9f232a125bf86b0dae09f8ea4a0553535cf6b658 h: refs/heads/master i: 14805: 608f9e60e84529a16b302e9ac6b447fe4bba48ad 14803: 61aac042fd12ede455ffb33d8bec1c73ba1ef9f9 14799: 3cd3470b9ad9ef8e61529580bcf140b1e2e76605 v: v3 --- [refs] | 2 +- trunk/arch/ppc/kernel/process.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7ce1901e312c..cdba2311a239 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 123d3c13e2853a11b4d599d754b356acb12886e2 +refs/heads/master: 9f232a125bf86b0dae09f8ea4a0553535cf6b658 diff --git a/trunk/arch/ppc/kernel/process.c b/trunk/arch/ppc/kernel/process.c index cb1c7b92f8c6..25cbdc8d2941 100644 --- a/trunk/arch/ppc/kernel/process.c +++ b/trunk/arch/ppc/kernel/process.c @@ -417,6 +417,7 @@ void show_regs(struct pt_regs * regs) void exit_thread(void) { + preempt_disable(); if (last_task_used_math == current) last_task_used_math = NULL; if (last_task_used_altivec == current) @@ -425,10 +426,12 @@ void exit_thread(void) if (last_task_used_spe == current) last_task_used_spe = NULL; #endif + preempt_enable(); } void flush_thread(void) { + preempt_disable(); if (last_task_used_math == current) last_task_used_math = NULL; if (last_task_used_altivec == current) @@ -437,6 +440,7 @@ void flush_thread(void) if (last_task_used_spe == current) last_task_used_spe = NULL; #endif + preempt_enable(); } void @@ -535,6 +539,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp) regs->nip = nip; regs->gpr[1] = sp; regs->msr = MSR_USER; + preempt_disable(); if (last_task_used_math == current) last_task_used_math = NULL; if (last_task_used_altivec == current) @@ -543,6 +548,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp) if (last_task_used_spe == current) last_task_used_spe = NULL; #endif + preempt_enable(); memset(current->thread.fpr, 0, sizeof(current->thread.fpr)); current->thread.fpscr.val = 0; #ifdef CONFIG_ALTIVEC