From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0CD4C4338F for ; Mon, 2 Aug 2021 15:55:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91E5161100 for ; Mon, 2 Aug 2021 15:55:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 91E5161100 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nmFqcRjqiWrCTRcckWW22Rzp6GkMhQeup7QSVDHpH/0=; b=KaePIpjUFgYGJV 1bzOy8g5NqfmLKG17T+ucRk/h28zroxiEzvS8rJaLE3tYP4kCcbTbNsK1GwwRUKGUPmOywiB9J6Gl zAfVaKybpyTf/vwIJs86cExzAswPHYtEyhjhh56miY/um8TAUtAlyik7MD+CZ1/SwI3OW3zhAysHW V+ekbbckPMp+cxJ4+CbZ5kG3q3NIb5V9ncVWd7hX64S5ldXPWv677imnF2iLkgod5b0fNt/xkWd1V ufv+gkWNJ98/0e68BIV6cYgaFammzoOqgktdVCqwaOQjdvLalnQOXdMbhMtC69iHSaHO8fA542hYy 0PloyfjNzTSng+zz/N/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAaGW-00H3tF-Rg; Mon, 02 Aug 2021 15:54:08 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAaGS-00H3sR-NF for linux-arm-kernel@lists.infradead.org; Mon, 02 Aug 2021 15:54:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AA35F11D4; Mon, 2 Aug 2021 08:54:01 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 046B73F66F; Mon, 2 Aug 2021 08:54:00 -0700 (PDT) Date: Mon, 2 Aug 2021 16:52:38 +0100 From: Dave Martin To: Mark Brown Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64/sve: Make fpsimd_bind_task_to_cpu() static Message-ID: <20210802155238.GD25258@arm.com> References: <20210730165846.18558-1-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210730165846.18558-1-broonie@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210802_085404_914206_3861D408 X-CRM114-Status: GOOD ( 23.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jul 30, 2021 at 05:58:46PM +0100, Mark Brown wrote: > This function is not referenced outside fpsimd.c so can be static, making > it that little bit easier to follow what is called from where. > > Signed-off-by: Mark Brown Otherwise, this seems sensible, since by definition no code that isn't switching task contexts should be calling this directly. Rather makes me wonder why it wasn't static in the first place. This might have arisen from splitting out a backend function from something else that isn't static, or maybe I was trying to do this directy from KVM. The notion of non- task context that the KVM now uses is newer than the original SVE code. Anyway, assuming you've grepped and tried to build with KVM at least (so, defconfig): Reviewed-by: Dave Martin > --- > arch/arm64/include/asm/fpsimd.h | 1 - > arch/arm64/kernel/fpsimd.c | 4 +++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/fpsimd.h b/arch/arm64/include/asm/fpsimd.h > index c072161d5c65..9a62884183e5 100644 > --- a/arch/arm64/include/asm/fpsimd.h > +++ b/arch/arm64/include/asm/fpsimd.h > @@ -45,7 +45,6 @@ extern void fpsimd_preserve_current_state(void); > extern void fpsimd_restore_current_state(void); > extern void fpsimd_update_current_state(struct user_fpsimd_state const *state); > > -extern void fpsimd_bind_task_to_cpu(void); > extern void fpsimd_bind_state_to_cpu(struct user_fpsimd_state *state, > void *sve_state, unsigned int sve_vl); > > diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c > index e57b23f95284..eb8d972ad3d2 100644 > --- a/arch/arm64/kernel/fpsimd.c > +++ b/arch/arm64/kernel/fpsimd.c > @@ -162,6 +162,8 @@ extern void __percpu *efi_sve_state; > DEFINE_PER_CPU(bool, fpsimd_context_busy); > EXPORT_PER_CPU_SYMBOL(fpsimd_context_busy); > > +static void fpsimd_bind_task_to_cpu(void); > + > static void __get_cpu_fpsimd_context(void) > { > bool busy = __this_cpu_xchg(fpsimd_context_busy, true); > @@ -1112,7 +1114,7 @@ void fpsimd_signal_preserve_current_state(void) > * The caller must have ownership of the cpu FPSIMD context before calling > * this function. > */ > -void fpsimd_bind_task_to_cpu(void) > +static void fpsimd_bind_task_to_cpu(void) > { > struct fpsimd_last_state_struct *last = > this_cpu_ptr(&fpsimd_last_state); > -- > 2.20.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel