[PATCH 3/5] x86, fpu: don't drop_fpu() in exit_thread() if use_eager_fpu()

From: Oleg Nesterov
Date: Sun Aug 24 2014 - 15:50:33 EST


Make exit_thread()->drop_fpu() depend on !use_eager_fpu(). This removes
another source of "use_eager_fpu() && !used_math()" special case.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
---
arch/x86/kernel/process.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 5df9447..7474f56 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -120,7 +120,8 @@ void exit_thread(void)
kfree(bp);
}

- drop_fpu(me);
+ if (!use_eager_fpu())
+ drop_fpu(me);
}

void flush_thread(void)
--
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/