diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-10-08 11:10:01 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-10-09 18:20:48 -0400 |
commit | e04582b7bc70b40c57287cdc24f81964ee88f565 (patch) | |
tree | a5127c2d4165e656a84612836f6326427843acca /arch/mips/kernel/ptrace32.c | |
parent | f5c70dd7f384db4c524c35288d9be3ed61ac41a9 (diff) |
[MIPS] Make sure cpu_has_fpu is used only in atomic context
Make sure cpu_has_fpu (which uses smp_processor_id()) is used only in
atomic context.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/ptrace32.c')
-rw-r--r-- | arch/mips/kernel/ptrace32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index f40ecd8be05f..d9a39c169450 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c | |||
@@ -175,7 +175,9 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
175 | unsigned int mtflags; | 175 | unsigned int mtflags; |
176 | #endif /* CONFIG_MIPS_MT_SMTC */ | 176 | #endif /* CONFIG_MIPS_MT_SMTC */ |
177 | 177 | ||
178 | preempt_disable(); | ||
178 | if (!cpu_has_fpu) { | 179 | if (!cpu_has_fpu) { |
180 | preempt_enable(); | ||
179 | tmp = 0; | 181 | tmp = 0; |
180 | break; | 182 | break; |
181 | } | 183 | } |
@@ -186,7 +188,6 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) | |||
186 | mtflags = dmt(); | 188 | mtflags = dmt(); |
187 | #endif /* CONFIG_MIPS_MT_SMTC */ | 189 | #endif /* CONFIG_MIPS_MT_SMTC */ |
188 | 190 | ||
189 | preempt_disable(); | ||
190 | if (cpu_has_mipsmt) { | 191 | if (cpu_has_mipsmt) { |
191 | unsigned int vpflags = dvpe(); | 192 | unsigned int vpflags = dvpe(); |
192 | flags = read_c0_status(); | 193 | flags = read_c0_status(); |