diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-09-08 11:01:10 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-09-08 11:01:44 +0200 |
commit | 7fd4394dfe1db02ba904dfa1048f718cbca822d1 (patch) | |
tree | 902d159ced8c873ee8f58c3301c30f674f099a03 /arch/mips/loongson/loongson-3/cop2-ex.c | |
parent | ALSA: virtuoso: add Xonar Essence STX II daughterboard support (diff) | |
parent | ALSA: pcm: Uninline snd_pcm_stream_lock() and _unlock() (diff) | |
download | linux-7fd4394dfe1db02ba904dfa1048f718cbca822d1.tar.xz linux-7fd4394dfe1db02ba904dfa1048f718cbca822d1.zip |
Merge branch 'topic/pcm-nonatomic' into for-next
This is a merge for exending PCM ops to be non-atomic.
Diffstat (limited to 'arch/mips/loongson/loongson-3/cop2-ex.c')
-rw-r--r-- | arch/mips/loongson/loongson-3/cop2-ex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/loongson/loongson-3/cop2-ex.c b/arch/mips/loongson/loongson-3/cop2-ex.c index 9182e8d2967c..b03e37d2071a 100644 --- a/arch/mips/loongson/loongson-3/cop2-ex.c +++ b/arch/mips/loongson/loongson-3/cop2-ex.c @@ -22,13 +22,13 @@ static int loongson_cu2_call(struct notifier_block *nfb, unsigned long action, void *data) { - int fpu_enabled; + int fpu_owned; int fr = !test_thread_flag(TIF_32BIT_FPREGS); switch (action) { case CU2_EXCEPTION: preempt_disable(); - fpu_enabled = read_c0_status() & ST0_CU1; + fpu_owned = __is_fpu_owner(); if (!fr) set_c0_status(ST0_CU1 | ST0_CU2); else @@ -39,8 +39,8 @@ static int loongson_cu2_call(struct notifier_block *nfb, unsigned long action, KSTK_STATUS(current) |= ST0_FR; else KSTK_STATUS(current) &= ~ST0_FR; - /* If FPU is enabled, we needn't init or restore fp */ - if(!fpu_enabled) { + /* If FPU is owned, we needn't init or restore fp */ + if (!fpu_owned) { set_thread_flag(TIF_USEDFPU); if (!used_math()) { _init_fpu(); |