From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760981AbbEEQ25 (ORCPT ); Tue, 5 May 2015 12:28:57 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:34727 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760945AbbEEQ2u (ORCPT ); Tue, 5 May 2015 12:28:50 -0400 From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Borislav Petkov , Dave Hansen , Fenghua Yu , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner Subject: [PATCH 041/208] x86/fpu: Remove __save_init_fpu() Date: Tue, 5 May 2015 18:24:21 +0200 Message-Id: <1430843228-13749-42-git-send-email-mingo@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430843228-13749-1-git-send-email-mingo@kernel.org> References: <1430843228-13749-1-git-send-email-mingo@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __save_init_fpu() is just a trivial wrapper around fpu_save_init(). Remove the extra layer of obfuscation. Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Thomas Gleixner Signed-off-by: Ingo Molnar --- arch/x86/include/asm/fpu-internal.h | 7 +------ arch/x86/kernel/fpu/core.c | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 16a1c66cf4ee..1e2b6c67b1f1 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -295,11 +295,6 @@ static inline int fpu_save_init(struct fpu *fpu) return 1; } -static inline int __save_init_fpu(struct task_struct *tsk) -{ - return fpu_save_init(&tsk->thread.fpu); -} - static inline int fpu_restore_checking(struct fpu *fpu) { if (use_xsave()) @@ -439,7 +434,7 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta (use_eager_fpu() || new->thread.fpu.counter > 5); if (__thread_has_fpu(old)) { - if (!__save_init_fpu(old)) + if (!fpu_save_init(&old->thread.fpu)) task_disable_lazy_fpu_restore(old); else old->thread.fpu.last_cpu = cpu; diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index 87f10b49da47..c99c79af48d2 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -97,7 +97,7 @@ void __kernel_fpu_begin(void) kernel_fpu_disable(); if (__thread_has_fpu(me)) { - __save_init_fpu(me); + fpu_save_init(&me->thread.fpu); } else { this_cpu_write(fpu_owner_task, NULL); if (!use_eager_fpu()) @@ -135,7 +135,7 @@ void fpu__save(struct task_struct *tsk) if (use_eager_fpu()) { __save_fpu(tsk); } else { - __save_init_fpu(tsk); + fpu_save_init(&tsk->thread.fpu); __thread_fpu_end(tsk); } } -- 2.1.0