summaryrefslogtreecommitdiff
path: root/arch/mips/loongson/loongson-3/cop2-ex.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-09-09 18:49:28 +0400
committerArnd Bergmann <arnd@arndb.de>2014-09-09 18:49:28 +0400
commit87e9d8fd26c782623b79f2968431179f29b339f2 (patch)
tree45e2cf70f4609ee82859d28dd8a34effc750a6c5 /arch/mips/loongson/loongson-3/cop2-ex.c
parentfacdb3dd378e81b8516a8faa061e0be56d2ae7be (diff)
parent75a41826e2c5dc1dc0fd5195fc29b031c97337af (diff)
downloadlinux-87e9d8fd26c782623b79f2968431179f29b339f2.tar.xz
Merge tag 'socfpga_update_for_v3.18' of git://git.rocketboards.org/linux-socfpga-next into next/dt
Pull "arm: dts: Add Altera SDRAM EDAC bindings & devicetree entries" From Dinh Nguyen: 5 of the 6 patches are DTS updates and the 1 patch is updating the MAINTAINERS entry with my new email address. Signed-off-by: Arnd Bergmann <arnd@arndb.de> * tag 'socfpga_update_for_v3.18' of git://git.rocketboards.org/linux-socfpga-next: arm: dts: Add Altera SDRAM EDAC bindings & devicetree entries. ARM: dts: socfpga: memreserve first 4KB for future system use ARM: dts: socfpga: Add SD card detect ARM: dts: socfpga: remove extra alias in the ArriaV devkit ARM: dts: socfpga: unuse the slot-node and deprecate the supports-highspeed for dw-mmc MAINTAINERS: update entries for ARM/SOCFPGA platform
Diffstat (limited to 'arch/mips/loongson/loongson-3/cop2-ex.c')
-rw-r--r--arch/mips/loongson/loongson-3/cop2-ex.c8
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();