Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp655892iog; Thu, 30 Jun 2022 07:48:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uR+lTpnrWMc5Omx4uOLXQPpuvPI5uoX7hcsOtoZwuUqRM9cDrOUj2E8RhgDTkNnIJkytlw X-Received: by 2002:a17:906:6015:b0:726:95c1:924f with SMTP id o21-20020a170906601500b0072695c1924fmr9033786ejj.576.1656600484963; Thu, 30 Jun 2022 07:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656600484; cv=none; d=google.com; s=arc-20160816; b=o7X51chF+xkfc/JT4U/LbsfywORF8BJFpHdDxiybmRAyMmtf6bCbiWVPP4Y9fVZ4xU ohn50MOVqLXZu1itQmz+H5zk6qdzQp9jCOHwLJeV1vtVLyTJr1mCp0JF/VF4RarN49Ur CiWKImIP9jyETfpADCaUmY1lBPOXFPLkhwz1P0/D4w0+T1yZl3xp+df1zptObSdiDVt+ +Db7UKk1U5odgV86MZR2xpkE/2dQbp+QXDHKFJoMzmReJCsdY64hd83H/twcy9aMzZtE 6kr8Vb3nPzKUSgVa81VdzNgRwXAyqdhkBEQN47fJYmfiDfqyk7euaDasOfXp+DHZIWRX uOvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4Xu0BgFontQ86ETPGnojWbjZf1NtCc8qeyJixd5nvcs=; b=NxKHSa9nDh3cqmne2trUZgPsmnHeUynG3FO3ZS7xW65KbwLiNqcY8o7BXl5KdX4EJm iBvPDJQ1iyoAJd1wxUEW+OoUSFCoQ3U5RYVcuI4XgwUMLFlftDtrurt0wwgLRFYYaBML sOAsCXMs3ey8uccERL98s9qTIBb3cOLWcBqZbgeBVlpWmzYB+cHoF1o1xc4NuFMGwHfa Vz40ezztAHcZ4sycmQgKQ/RdX5+hQWxvN1h9NhlQtxq1iUjqYcH4pAahOI2fO6uzmidR hSpS3TlaNuzD354cIDhGV80lMVcXFiI/GQVN/81x+i7LpdSdSrgkbUlmi04iy2021Ikw xuMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KCoxJDs+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw18-20020a1709066a1200b0072a6b4767d0si1856597ejc.793.2022.06.30.07.47.39; Thu, 30 Jun 2022 07:48:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KCoxJDs+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236527AbiF3OFp (ORCPT + 99 others); Thu, 30 Jun 2022 10:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236379AbiF3OFV (ORCPT ); Thu, 30 Jun 2022 10:05:21 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 826396D56F; Thu, 30 Jun 2022 06:53:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 3D264CE2DD1; Thu, 30 Jun 2022 13:53:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CD7DC34115; Thu, 30 Jun 2022 13:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656597215; bh=75FS4mImmojh8s0Xv4FDHHXbR73W83BbQ4InWvG+w1w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KCoxJDs+pK1asheEjhcpUzAWFhpb6SxkztEogGDseqNDIxNPrw3ixAED+LnhjKMGT gBy0U0zd7JijcmNm1yH6wUKxduBgErK0qqFA7zA/PB+ophM5iYYOJcDsl1Jzd/X0X/ 1UUN1bb9rQPkggV1ZcUzU1cnyriPuHu5ZCF2BhTk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Stefan Agner , Russell King , Florian Fainelli Subject: [PATCH 5.4 06/16] ARM: 8989/1: use .fpu assembler directives instead of assembler arguments Date: Thu, 30 Jun 2022 15:47:00 +0200 Message-Id: <20220630133231.126308979@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220630133230.936488203@linuxfoundation.org> References: <20220630133230.936488203@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Agner commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 upstream Explicit FPU selection has been introduced in commit 1a6be26d5b1a ("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected") to make use of assembler mnemonics for VFP instructions. However, clang currently does not support passing assembler flags like this and errors out with: clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp' Make use of the .fpu assembler directives to select the floating point hardware selectively. Also use the new unified assembler language mnemonics. This allows to build these procedures with Clang. Link: https://github.com/ClangBuiltLinux/linux/issues/762 Signed-off-by: Stefan Agner Signed-off-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: Greg Kroah-Hartman --- arch/arm/vfp/Makefile | 2 -- arch/arm/vfp/vfphw.S | 30 ++++++++++++++++++++---------- 2 files changed, 20 insertions(+), 12 deletions(-) --- a/arch/arm/vfp/Makefile +++ b/arch/arm/vfp/Makefile @@ -8,6 +8,4 @@ # ccflags-y := -DDEBUG # asflags-y := -DDEBUG -KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp -mfloat-abi=soft) - obj-y += vfpmodule.o entry.o vfphw.o vfpsingle.o vfpdouble.o --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S @@ -253,11 +253,14 @@ vfp_current_hw_state_address: ENTRY(vfp_get_float) tbl_branch r0, r3, #3 + .fpu vfpv2 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 -1: mrc p10, 0, r0, c\dr, c0, 0 @ fmrs r0, s0 +1: vmov r0, s\dr ret lr .org 1b + 8 -1: mrc p10, 0, r0, c\dr, c0, 4 @ fmrs r0, s1 + .endr + .irp dr,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 +1: vmov r0, s\dr ret lr .org 1b + 8 .endr @@ -265,11 +268,14 @@ ENDPROC(vfp_get_float) ENTRY(vfp_put_float) tbl_branch r1, r3, #3 + .fpu vfpv2 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 -1: mcr p10, 0, r0, c\dr, c0, 0 @ fmsr r0, s0 +1: vmov s\dr, r0 ret lr .org 1b + 8 -1: mcr p10, 0, r0, c\dr, c0, 4 @ fmsr r0, s1 + .endr + .irp dr,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 +1: vmov s\dr, r0 ret lr .org 1b + 8 .endr @@ -277,15 +283,17 @@ ENDPROC(vfp_put_float) ENTRY(vfp_get_double) tbl_branch r0, r3, #3 + .fpu vfpv2 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 -1: fmrrd r0, r1, d\dr +1: vmov r0, r1, d\dr ret lr .org 1b + 8 .endr #ifdef CONFIG_VFPv3 @ d16 - d31 registers - .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 -1: mrrc p11, 3, r0, r1, c\dr @ fmrrd r0, r1, d\dr + .fpu vfpv3 + .irp dr,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 +1: vmov r0, r1, d\dr ret lr .org 1b + 8 .endr @@ -299,15 +307,17 @@ ENDPROC(vfp_get_double) ENTRY(vfp_put_double) tbl_branch r2, r3, #3 + .fpu vfpv2 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 -1: fmdrr d\dr, r0, r1 +1: vmov d\dr, r0, r1 ret lr .org 1b + 8 .endr #ifdef CONFIG_VFPv3 + .fpu vfpv3 @ d16 - d31 registers - .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 -1: mcrr p11, 3, r0, r1, c\dr @ fmdrr r0, r1, d\dr + .irp dr,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 +1: vmov d\dr, r0, r1 ret lr .org 1b + 8 .endr