diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-10-09 00:10:01 +0900 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-10-09 23:20:48 +0100 |
commit | e04582b7bc70b40c57287cdc24f81964ee88f565 (patch) | |
tree | a5127c2d4165e656a84612836f6326427843acca /arch/mips/kernel/ptrace32.c | |
parent | f5c70dd7f384db4c524c35288d9be3ed61ac41a9 (diff) | |
download | blackbird-obmc-linux-e04582b7bc70b40c57287cdc24f81964ee88f565.tar.gz blackbird-obmc-linux-e04582b7bc70b40c57287cdc24f81964ee88f565.zip |
[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) unsigned int mtflags; #endif /* CONFIG_MIPS_MT_SMTC */ + preempt_disable(); if (!cpu_has_fpu) { + preempt_enable(); tmp = 0; break; } @@ -186,7 +188,6 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) mtflags = dmt(); #endif /* CONFIG_MIPS_MT_SMTC */ - preempt_disable(); if (cpu_has_mipsmt) { unsigned int vpflags = dvpe(); flags = read_c0_status(); |