[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-03eaec81ac09814817e9f0307d572ffe8365f980@git.kernel.org>
Date: Tue, 26 Sep 2017 01:30:33 -0700
From: tip-bot for Andi Kleen <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: dave.hansen@...ux.intel.com, tglx@...utronix.de,
peterz@...radead.org, luto@...capital.net, riel@...hat.com,
bp@...en8.de, mingo@...nel.org, ak@...ux.intel.com,
linux-kernel@...r.kernel.org, ebiggers3@...il.com,
torvalds@...ux-foundation.org, yu-cheng.yu@...el.com,
akpm@...ux-foundation.org, fenghua.yu@...el.com, oleg@...hat.com,
hpa@...or.com
Subject: [tip:x86/fpu] x86/fpu: Turn WARN_ON() in context switch into
WARN_ON_FPU()
Commit-ID: 03eaec81ac09814817e9f0307d572ffe8365f980
Gitweb: http://git.kernel.org/tip/03eaec81ac09814817e9f0307d572ffe8365f980
Author: Andi Kleen <ak@...ux.intel.com>
AuthorDate: Sat, 23 Sep 2017 15:00:06 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sun, 24 Sep 2017 13:04:35 +0200
x86/fpu: Turn WARN_ON() in context switch into WARN_ON_FPU()
copy_xregs_to_kernel checks if the alternatives have been already
patched.
This WARN_ON() is always executed in every context switch.
All the other checks in fpu internal.h are WARN_ON_FPU(), but
this one is plain WARN_ON(). I assume it was forgotten to switch it.
So switch it to WARN_ON_FPU() too to avoid some unnecessary code
in the context switch, and a potentially expensive cache line miss for the
global variable.
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Eric Biggers <ebiggers3@...il.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Yu-cheng Yu <yu-cheng.yu@...el.com>
Link: http://lkml.kernel.org/r/20170329062605.4970-1-andi@firstfloor.org
Link: http://lkml.kernel.org/r/20170923130016.21448-24-mingo@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/include/asm/fpu/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h
index 629e7abc..2dca7c6 100644
--- a/arch/x86/include/asm/fpu/internal.h
+++ b/arch/x86/include/asm/fpu/internal.h
@@ -350,7 +350,7 @@ static inline void copy_xregs_to_kernel(struct xregs_state *xstate)
u32 hmask = mask >> 32;
int err;
- WARN_ON(!alternatives_patched);
+ WARN_ON_FPU(!alternatives_patched);
XSTATE_XSAVE(xstate, lmask, hmask, err);
Powered by blists - more mailing lists