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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id F3BD4C3DA7F for ; Thu, 1 Aug 2024 00:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W+snayEaUL34Nu2UQTVwSNsH1mxxe+hPVuIhZnHlN8A=; b=pi+gcfafUXSN0L4nSHj4OceRQe FII6maAqpwadekkTVhkeiyDiADqqm3y46Vkbi/gHwH67dgOyx2cpzTcgY3QXetxdqc1FO5H/wcFbu WURK9GUs4CH1N3bWZ3R4vIuSshII5NGrpn2DkMUybb97nJ31o42EnV5AdU92Tw7w5BPvYXOHqbh8S 1Vs1DJ19MoyWHr7H/WwFMJ3uLYJLQhbXehSmdBNGCyAZnwL/IMzdjDf7x/GandiZAA7fcAFo8r4Gv /qOQ9JSIWXLUIXrJNu4aX5USatWOk/tm6I4os9jm6zsQkBoOBFYSPXT5A8hIf2W+ugyNBeFxmlYr6 6BP8Rt5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZJxq-000000035rB-0Eov; Thu, 01 Aug 2024 00:46:42 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZJxM-000000035mN-27Qs for linux-arm-kernel@lists.infradead.org; Thu, 01 Aug 2024 00:46:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 583A461741; Thu, 1 Aug 2024 00:46:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86CDBC32786; Thu, 1 Aug 2024 00:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722473171; bh=QXB+Z5FpiqgfYoEvDfeP1USRrY1OExDjMPcjUHr9+cM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WEg2+wf8Y75hVkqIEAE8+5PCjhhPnOf1+330pgNwC8YHwqpNPFX8f8ILCh20LnyXb eG4zqn/92cdLtVLHi0H4j0+tH6aW+P8m+nUn+VSOkbPBqLAWWjfY64T21bhfg/GZ2X sJ/eTz0cTKQf/7OaTbl+xl51Q4TO+fLKr+Ud/UtPzyVNJwB41jgSvrATztUmiO3qnr TBQEs33zF6snJ3t9zgsmi5bNbWsCzbHG8+v/18LDW6eU1l30UVFIgnHhyxWxDxSdte CRpRcJDpWxmuDoYoK4DMe8WEooCHgqFwijOVMUzaMRqhAmKbzjNDc14Mik3dCRJMUS YRMOI7PZzqf4A== Date: Wed, 31 Jul 2024 17:46:09 -0700 From: Nathan Chancellor To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Calvin Owens , Arnd Bergmann , clang-built-linux , Russell King , Linus Walleij Subject: Re: [PATCH] ARM: assembler: Drop obsolete VFP accessor fallback Message-ID: <20240801004609.GA1614495@thelio-3990X> References: <20240730094858.1070431-2-ardb+git@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240730094858.1070431-2-ardb+git@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240731_174612_659274_A8E7128F X-CRM114-Status: GOOD ( 19.60 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 30, 2024 at 11:48:59AM +0200, Ard Biesheuvel wrote: > From: Ard Biesheuvel > > Now that the minimum supported binutils version is 2.25, we no longer > need a workaround for binutils older than 2.24 for accessing VFP control > registers from assembler. > > Cc: Calvin Owens > Cc: Arnd Bergmann > Cc: Nathan Chancellor > Cc: clang-built-linux > Cc: Russell King > Cc: Linus Walleij > Signed-off-by: Ard Biesheuvel Very nice :) Reviewed-by: Nathan Chancellor > --- > Note: applies onto 9410/1 > > arch/arm/Kconfig | 2 -- > arch/arm/Kconfig.assembler | 6 ------ > arch/arm/include/asm/vfp.h | 10 --------- > arch/arm/include/asm/vfpmacros.h | 11 ---------- > arch/arm/vfp/vfpinstr.h | 22 -------------------- > 5 files changed, 51 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 54b2bb817a7f..854a12d89471 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1747,5 +1747,3 @@ config ARCH_HIBERNATION_POSSIBLE > default y if ARCH_SUSPEND_POSSIBLE > > endmenu > - > -source "arch/arm/Kconfig.assembler" > diff --git a/arch/arm/Kconfig.assembler b/arch/arm/Kconfig.assembler > deleted file mode 100644 > index 5cb31aae1188..000000000000 > --- a/arch/arm/Kconfig.assembler > +++ /dev/null > @@ -1,6 +0,0 @@ > -# SPDX-License-Identifier: GPL-2.0 > - > -config AS_VFP_VMRS_FPINST > - def_bool $(as-instr,.fpu vfpv2\nvmrs r0$(comma)FPINST) > - help > - Supported by binutils >= 2.24 and LLVM integrated assembler. > diff --git a/arch/arm/include/asm/vfp.h b/arch/arm/include/asm/vfp.h > index 157ea3426158..85ccc422d4d0 100644 > --- a/arch/arm/include/asm/vfp.h > +++ b/arch/arm/include/asm/vfp.h > @@ -9,16 +9,6 @@ > #ifndef __ASM_VFP_H > #define __ASM_VFP_H > > -#ifndef CONFIG_AS_VFP_VMRS_FPINST > -#define FPSID cr0 > -#define FPSCR cr1 > -#define MVFR1 cr6 > -#define MVFR0 cr7 > -#define FPEXC cr8 > -#define FPINST cr9 > -#define FPINST2 cr10 > -#endif > - > /* FPSID bits */ > #define FPSID_IMPLEMENTER_BIT (24) > #define FPSID_IMPLEMENTER_MASK (0xff << FPSID_IMPLEMENTER_BIT) > diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h > index ba0d4cb5377e..e2e1d5a3727a 100644 > --- a/arch/arm/include/asm/vfpmacros.h > +++ b/arch/arm/include/asm/vfpmacros.h > @@ -8,7 +8,6 @@ > > #include > > -#ifdef CONFIG_AS_VFP_VMRS_FPINST > .macro VFPFMRX, rd, sysreg, cond > vmrs\cond \rd, \sysreg > .endm > @@ -16,16 +15,6 @@ > .macro VFPFMXR, sysreg, rd, cond > vmsr\cond \sysreg, \rd > .endm > -#else > - @ Macros to allow building with old toolkits (with no VFP support) > - .macro VFPFMRX, rd, sysreg, cond > - MRC\cond p10, 7, \rd, \sysreg, cr0, 0 @ FMRX \rd, \sysreg > - .endm > - > - .macro VFPFMXR, sysreg, rd, cond > - MCR\cond p10, 7, \rd, \sysreg, cr0, 0 @ FMXR \sysreg, \rd > - .endm > -#endif > > @ read all the working registers back into the VFP > .macro VFPFLDMIA, base, tmp > diff --git a/arch/arm/vfp/vfpinstr.h b/arch/arm/vfp/vfpinstr.h > index 32090b0fb250..a2f0c47e0ce7 100644 > --- a/arch/arm/vfp/vfpinstr.h > +++ b/arch/arm/vfp/vfpinstr.h > @@ -62,8 +62,6 @@ > #define FPSCR_C (1 << 29) > #define FPSCR_V (1 << 28) > > -#ifdef CONFIG_AS_VFP_VMRS_FPINST > - > #define fmrx(_vfp_) ({ \ > u32 __v; \ > asm volatile (".fpu vfpv2\n" \ > @@ -78,26 +76,6 @@ > : : "r" (_var_) : "cc"); \ > }) > > -#else > - > -#define vfpreg(_vfp_) #_vfp_ > - > -#define fmrx(_vfp_) ({ \ > - u32 __v; \ > - asm volatile ("mrc p10, 7, %0, " vfpreg(_vfp_) "," \ > - "cr0, 0 @ fmrx %0, " #_vfp_ \ > - : "=r" (__v) : : "cc"); \ > - __v; \ > -}) > - > -#define fmxr(_vfp_, _var_) ({ \ > - asm volatile ("mcr p10, 7, %0, " vfpreg(_vfp_) "," \ > - "cr0, 0 @ fmxr " #_vfp_ ", %0" \ > - : : "r" (_var_) : "cc"); \ > -}) > - > -#endif > - > u32 vfp_single_cpdo(u32 inst, u32 fpscr); > u32 vfp_single_cprt(u32 inst, u32 fpscr, struct pt_regs *regs); > > -- > 2.46.0.rc1.232.g9752f9e123-goog >