OSDN Git Service

x86/fpu: Remove the explicit clearing of XSAVE dependent features
authorAndi Kleen <ak@linux.intel.com>
Fri, 13 Oct 2017 21:56:45 +0000 (14:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:14 +0000 (14:26 +0100)
commit110ad51cc874a943792e16258e52ff3360cb4f96
tree445c2c62005e6000a3ceb7edc23a88d5607f803a
parent0e7127aa76e05b51f767dbec74b236a1fa5eab06
x86/fpu: Remove the explicit clearing of XSAVE dependent features

commit 73e3a7d2a7c3be29a5a22b85026f6cfa5664267f upstream.

Clearing a CPU feature with setup_clear_cpu_cap() clears all features
which depend on it. Expressing feature dependencies in one place is
easier to maintain than keeping functions like
fpu__xstate_clear_all_cpu_caps() up to date.

The features which depend on XSAVE have their dependency expressed in the
dependency table, so its sufficient to clear X86_FEATURE_XSAVE.

Remove the explicit clearing of XSAVE dependent features.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20171013215645.23166-6-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/fpu/xstate.c