Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1520309pxb; Wed, 20 Oct 2021 06:46:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvJsgF52SUnAGDUaA+Qk/heT2ln/OJjvhpp/k+lk8R7u8FN5XXYP8tr0NwqjqJgZ47nIPL X-Received: by 2002:a17:903:234a:b0:13e:f01a:24f with SMTP id c10-20020a170903234a00b0013ef01a024fmr39560931plh.43.1634737587113; Wed, 20 Oct 2021 06:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634737587; cv=none; d=google.com; s=arc-20160816; b=Blbx8/O+2PLUndYGxEEfzE9C7jrmlCgRD2FIDFMfGxRXWmg1qCwA/asifdrSmcB9S+ OYWJuxuq4Xn2Fc/7qiJuxnMUh6PZmDvWTZvdaWMyyXqGvjJG92dybVwHr8SHptWU9rCY k5yiqIk7Q+lWoeO/xH2NUix+eeEKhRVgrVqwrl5k4hbGJjazd+4T/eF+6aL88cig6xmy YzdivkjQm5EHk0aH7FUPvoB51OWczpSaokSQvbQps6rxJKpv9QJPOf3qDRVauF3pZ9U6 eY+mZs+cUh2k+60HgVfKQaEy/JZy6fXuqaSm8xQWtmil2SmfPZdshIUmW+kyLNRYWmCm khPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=bNMJo4gflRo1hufQA8L/YJ6My3GE1UQeUpv3h4wL6Wg=; b=f+WbLpPbHSqfmXtxDrQZKBFfmyOFrkjai+xAmgPafII2tuPjN9U5QFzsiBvqq7lydG aamdpyjhjq1uBFpwFtRRgS+vQlaITND2ATpPZEVcZsUP4yOaUL18pKi+7HqktJ1pvqGj hiDiHEIBE6AEWSJmf+6tFzicZEt9iePKK1s3gYRxz5hRb7U/kt8GPPXuYFJPhGEqk3RR gOmm7DEGiBDP/f0DDITxNak3voRndmXD3Rx5Sf8NIofgR5qW34vv5K3ziqHU413wFe7U tSxUgH9aVjl2FORoKzjZNJjhYsVUFKJcMYZiOeOQ9KibKCAkk2/6a/JNjcZnvmWTPsB/ WvcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Jmu1u346; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pc8si3330690pjb.18.2021.10.20.06.45.59; Wed, 20 Oct 2021 06:46:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Jmu1u346; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbhJTNqv (ORCPT + 99 others); Wed, 20 Oct 2021 09:46:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230200AbhJTNqq (ORCPT ); Wed, 20 Oct 2021 09:46:46 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C395CC06161C; Wed, 20 Oct 2021 06:44:31 -0700 (PDT) Date: Wed, 20 Oct 2021 13:44:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1634737469; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bNMJo4gflRo1hufQA8L/YJ6My3GE1UQeUpv3h4wL6Wg=; b=Jmu1u346v+P1CE8KfCaA37rCgBWGj6XT1qlkaKBSfF9ZlDne1FPNceIXLNlhxd/WscMoIR KkbMZSX1LQ8oqzgHRthEuhBN04w486RJ1J/jMBAt/qO8WxAjllX+0+JVx1jmQLBSdcZMgv E3Z+mZZUS7VO6VJUq+gGlDTO39dWFdK5D56EBX9yv5ORUTN8U/r9L+2fP/WIWvDvZvMWyq C5ry+cu48z/c9Vp3zYN6qLyAVlvqD9bjLUTEeBMjD7B5rJGnuDc/xZlD1zVenUQe6Pt0nu YkGRLCjcRI/CUUA5/9aNHf0ggFS9TzIpznBLtr9WkuRXSxjX/C3Vu3GOnU3Tnw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1634737469; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bNMJo4gflRo1hufQA8L/YJ6My3GE1UQeUpv3h4wL6Wg=; b=FcwTIVy71tEec3GG0yLCpHzaLE1CJu5Q9IIe1qMcoRqL3Va8EiAEr1Y7KaI18SZx4sorJZ 3IVV9t61GfEhDiBA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/fpu] x86/fpu: Mop up the internal.h leftovers Cc: Thomas Gleixner , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20211015011539.948837194@linutronix.de> References: <20211015011539.948837194@linutronix.de> MIME-Version: 1.0 Message-ID: <163473746866.25758.11966714138379782102.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/fpu branch of tip: Commit-ID: 6415bb80926379310afd74800415f6ebf4bb5c31 Gitweb: https://git.kernel.org/tip/6415bb80926379310afd74800415f6ebf4bb5c31 Author: Thomas Gleixner AuthorDate: Fri, 15 Oct 2021 03:16:38 +02:00 Committer: Borislav Petkov CommitterDate: Wed, 20 Oct 2021 15:27:29 +02:00 x86/fpu: Mop up the internal.h leftovers Move the global interfaces to api.h and the rest into the core. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20211015011539.948837194@linutronix.de --- arch/x86/include/asm/fpu/api.h | 10 ++++++++++ arch/x86/include/asm/fpu/internal.h | 18 ------------------ arch/x86/kernel/fpu/init.c | 1 + arch/x86/kernel/fpu/xstate.h | 3 +++ 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/arch/x86/include/asm/fpu/api.h b/arch/x86/include/asm/fpu/api.h index 17893af..c691f07 100644 --- a/arch/x86/include/asm/fpu/api.h +++ b/arch/x86/include/asm/fpu/api.h @@ -110,6 +110,16 @@ extern int cpu_has_xfeatures(u64 xfeatures_mask, const char **feature_name); static inline void update_pasid(void) { } +/* Trap handling */ +extern int fpu__exception_code(struct fpu *fpu, int trap_nr); +extern void fpu_sync_fpstate(struct fpu *fpu); + +/* Boot, hotplug and resume */ +extern void fpu__init_cpu(void); +extern void fpu__init_system(struct cpuinfo_x86 *c); +extern void fpu__init_check_bugs(void); +extern void fpu__resume_cpu(void); + #ifdef CONFIG_MATH_EMULATION extern void fpstate_init_soft(struct swregs_state *soft); #else diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index 8f97d3e..8df83e8 100644 --- a/arch/x86/include/asm/fpu/internal.h +++ b/arch/x86/include/asm/fpu/internal.h @@ -23,22 +23,4 @@ #include #include -/* - * High level FPU state handling functions: - */ -extern void fpu__clear_user_states(struct fpu *fpu); -extern int fpu__exception_code(struct fpu *fpu, int trap_nr); - -extern void fpu_sync_fpstate(struct fpu *fpu); - -/* - * Boot time FPU initialization functions: - */ -extern void fpu__init_cpu(void); -extern void fpu__init_system_xstate(void); -extern void fpu__init_cpu_xstate(void); -extern void fpu__init_system(struct cpuinfo_x86 *c); -extern void fpu__init_check_bugs(void); -extern void fpu__resume_cpu(void); - #endif /* _ASM_X86_FPU_INTERNAL_H */ diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c index e77084a..d420d29 100644 --- a/arch/x86/kernel/fpu/init.c +++ b/arch/x86/kernel/fpu/init.c @@ -12,6 +12,7 @@ #include "internal.h" #include "legacy.h" +#include "xstate.h" /* * Initialize the registers found in all CPUs, CR0 and CR4: diff --git a/arch/x86/kernel/fpu/xstate.h b/arch/x86/kernel/fpu/xstate.h index ae61baa..bb6d7d2 100644 --- a/arch/x86/kernel/fpu/xstate.h +++ b/arch/x86/kernel/fpu/xstate.h @@ -18,6 +18,9 @@ static inline void xstate_init_xcomp_bv(struct xregs_state *xsave, u64 mask) extern void __copy_xstate_to_uabi_buf(struct membuf to, struct xregs_state *xsave, u32 pkru_val, enum xstate_copy_mode copy_mode); +extern void fpu__init_cpu_xstate(void); +extern void fpu__init_system_xstate(void); + /* XSAVE/XRSTOR wrapper functions */ #ifdef CONFIG_X86_64