From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030340AbdIZIiq (ORCPT ); Tue, 26 Sep 2017 04:38:46 -0400 Received: from terminus.zytor.com ([65.50.211.136]:39323 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965366AbdIZIio (ORCPT ); Tue, 26 Sep 2017 04:38:44 -0400 Date: Tue, 26 Sep 2017 01:32:06 -0700 From: tip-bot for Ingo Molnar Message-ID: Cc: hpa@zytor.com, bobbypowers@gmail.com, tglx@linutronix.de, yu-cheng.yu@intel.com, luto@amacapital.net, ebiggers3@gmail.com, bp@alien8.de, peterz@infradead.org, mingo@kernel.org, dave.hansen@linux.intel.com, torvalds@linux-foundation.org, oleg@redhat.com, linux-kernel@vger.kernel.org, riel@redhat.com, fenghua.yu@intel.com, akpm@linux-foundation.org Reply-To: peterz@infradead.org, dave.hansen@linux.intel.com, mingo@kernel.org, linux-kernel@vger.kernel.org, oleg@redhat.com, torvalds@linux-foundation.org, fenghua.yu@intel.com, akpm@linux-foundation.org, riel@redhat.com, bobbypowers@gmail.com, hpa@zytor.com, ebiggers3@gmail.com, yu-cheng.yu@intel.com, tglx@linutronix.de, luto@amacapital.net, bp@alien8.de In-Reply-To: <20170923130016.21448-29-mingo@kernel.org> References: <20170923130016.21448-29-mingo@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/fpu] x86/fpu: Remove fpu__current_fpstate_write_begin/end() Git-Commit-ID: 685c930d6e58e31e251ec354f9dca3958a4c5040 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 685c930d6e58e31e251ec354f9dca3958a4c5040 Gitweb: http://git.kernel.org/tip/685c930d6e58e31e251ec354f9dca3958a4c5040 Author: Ingo Molnar AuthorDate: Sat, 23 Sep 2017 15:00:11 +0200 Committer: Ingo Molnar CommitDate: Tue, 26 Sep 2017 09:42:20 +0200 x86/fpu: Remove fpu__current_fpstate_write_begin/end() These functions are not used anymore, so remove them. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Bobby Powers Cc: Borislav Petkov Cc: Dave Hansen Cc: Eric Biggers Cc: Fenghua Yu Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Yu-cheng Yu Link: http://lkml.kernel.org/r/20170923130016.21448-29-mingo@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/include/asm/fpu/internal.h | 2 -- arch/x86/kernel/fpu/core.c | 63 ------------------------------------- 2 files changed, 65 deletions(-) diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index cf290d4..508e418 100644 --- a/arch/x86/include/asm/fpu/internal.h +++ b/arch/x86/include/asm/fpu/internal.h @@ -26,8 +26,6 @@ extern void fpu__activate_curr(struct fpu *fpu); extern void fpu__activate_fpstate_read(struct fpu *fpu); extern void fpu__activate_fpstate_write(struct fpu *fpu); -extern void fpu__current_fpstate_write_begin(void); -extern void fpu__current_fpstate_write_end(void); extern void fpu__save(struct fpu *fpu); extern void fpu__restore(struct fpu *fpu); extern int fpu__restore_sig(void __user *buf, int ia32_frame); diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index afd3f2a..b2cdeb3 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -317,69 +317,6 @@ void fpu__activate_fpstate_write(struct fpu *fpu) } /* - * This function must be called before we write the current - * task's fpstate. - * - * This call gets the current FPU register state and moves - * it in to the 'fpstate'. Preemption is disabled so that - * no writes to the 'fpstate' can occur from context - * swiches. - * - * Must be followed by a fpu__current_fpstate_write_end(). - */ -void fpu__current_fpstate_write_begin(void) -{ - struct fpu *fpu = ¤t->thread.fpu; - - /* - * Ensure that the context-switching code does not write - * over the fpstate while we are doing our update. - */ - preempt_disable(); - - /* - * Move the fpregs in to the fpu's 'fpstate'. - */ - fpu__activate_fpstate_read(fpu); - - /* - * The caller is about to write to 'fpu'. Ensure that no - * CPU thinks that its fpregs match the fpstate. This - * ensures we will not be lazy and skip a XRSTOR in the - * future. - */ - __fpu_invalidate_fpregs_state(fpu); -} - -/* - * This function must be paired with fpu__current_fpstate_write_begin() - * - * This will ensure that the modified fpstate gets placed back in - * the fpregs if necessary. - * - * Note: This function may be called whether or not an _actual_ - * write to the fpstate occurred. - */ -void fpu__current_fpstate_write_end(void) -{ - struct fpu *fpu = ¤t->thread.fpu; - - /* - * 'fpu' now has an updated copy of the state, but the - * registers may still be out of date. Update them with - * an XRSTOR if they are active. - */ - if (fpu->fpstate_active) - copy_kernel_to_fpregs(&fpu->state); - - /* - * Our update is done and the fpregs/fpstate are in sync - * if necessary. Context switches can happen again. - */ - preempt_enable(); -} - -/* * 'fpu__restore()' is called to copy FPU registers from * the FPU fpstate to the live hw registers and to activate * access to the hardware registers, so that FPU instructions