[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b78ea19ac22fd7b32d7828066cce3d8f2db5226a@git.kernel.org>
Date: Mon, 17 Jun 2019 03:31:08 -0700
From: tip-bot for Christoph Hellwig <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, bigeasy@...utronix.de, hch@....de,
mingo@...hat.com, x86@...nel.org, linux-kernel@...r.kernel.org,
mingo@...nel.org, nstange@...e.de, dave.hansen@...el.com,
bp@...e.de, hpa@...or.com, riel@...riel.com
Subject: [tip:x86/fpu] x86/fpu: Simplify kernel_fpu_end()
Commit-ID: b78ea19ac22fd7b32d7828066cce3d8f2db5226a
Gitweb: https://git.kernel.org/tip/b78ea19ac22fd7b32d7828066cce3d8f2db5226a
Author: Christoph Hellwig <hch@....de>
AuthorDate: Tue, 4 Jun 2019 09:15:22 +0200
Committer: Borislav Petkov <bp@...e.de>
CommitDate: Mon, 17 Jun 2019 10:43:43 +0200
x86/fpu: Simplify kernel_fpu_end()
Remove two little helpers and merge them into kernel_fpu_end() to
streamline the function.
Signed-off-by: Christoph Hellwig <hch@....de>
Signed-off-by: Borislav Petkov <bp@...e.de>
Acked-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Nicolai Stange <nstange@...e.de>
Cc: Rik van Riel <riel@...riel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: x86-ml <x86@...nel.org>
Link: https://lkml.kernel.org/r/20190604071524.12835-2-hch@lst.de
---
arch/x86/kernel/fpu/core.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 649fbc3fcf9f..8e046068d20f 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -49,12 +49,6 @@ static void kernel_fpu_disable(void)
this_cpu_write(in_kernel_fpu, true);
}
-static void kernel_fpu_enable(void)
-{
- WARN_ON_FPU(!this_cpu_read(in_kernel_fpu));
- this_cpu_write(in_kernel_fpu, false);
-}
-
static bool kernel_fpu_disabled(void)
{
return this_cpu_read(in_kernel_fpu);
@@ -115,11 +109,6 @@ static void __kernel_fpu_begin(void)
__cpu_invalidate_fpregs_state();
}
-static void __kernel_fpu_end(void)
-{
- kernel_fpu_enable();
-}
-
void kernel_fpu_begin(void)
{
preempt_disable();
@@ -129,7 +118,9 @@ EXPORT_SYMBOL_GPL(kernel_fpu_begin);
void kernel_fpu_end(void)
{
- __kernel_fpu_end();
+ WARN_ON_FPU(!this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, false);
preempt_enable();
}
EXPORT_SYMBOL_GPL(kernel_fpu_end);
Powered by blists - more mailing lists