aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-10-14 01:12:41 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-10-14 02:43:41 -0400
commiteaa47704d950d7f85b41a314a00529fb2615c10e (patch)
treee1a337ad87d141de01bebafe99c5dab83179701c
parent99222622422ac3398a846645f190109e218c743c (diff)
sh: Use boot_cpu_data for FPU tests in sigcontext paths.
We do not want to use smp_processor_id() from these paths, as they trip preempt BUGs. Switch the test over to the boot cpu directly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/kernel/signal_32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 6729703547a1..55d1f814e343 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -145,7 +145,7 @@ static inline int restore_sigcontext_fpu(struct sigcontext __user *sc)
145{ 145{
146 struct task_struct *tsk = current; 146 struct task_struct *tsk = current;
147 147
148 if (!(current_cpu_data.flags & CPU_HAS_FPU)) 148 if (!(boot_cpu_data.flags & CPU_HAS_FPU))
149 return 0; 149 return 0;
150 150
151 set_used_math(); 151 set_used_math();
@@ -158,7 +158,7 @@ static inline int save_sigcontext_fpu(struct sigcontext __user *sc,
158{ 158{
159 struct task_struct *tsk = current; 159 struct task_struct *tsk = current;
160 160
161 if (!(current_cpu_data.flags & CPU_HAS_FPU)) 161 if (!(boot_cpu_data.flags & CPU_HAS_FPU))
162 return 0; 162 return 0;
163 163
164 if (!used_math()) { 164 if (!used_math()) {
@@ -199,7 +199,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p
199#undef COPY 199#undef COPY
200 200
201#ifdef CONFIG_SH_FPU 201#ifdef CONFIG_SH_FPU
202 if (current_cpu_data.flags & CPU_HAS_FPU) { 202 if (boot_cpu_data.flags & CPU_HAS_FPU) {
203 int owned_fp; 203 int owned_fp;
204 struct task_struct *tsk = current; 204 struct task_struct *tsk = current;
205 205