From patchwork Fri Mar 29 07:18:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13610354 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 DB8FBCD1292 for ; Fri, 29 Mar 2024 08:34:17 +0000 (UTC) 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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yqKWC8NXeEL4paRz0zhGMQawoCJRaw8aZ15sEDdppOw=; b=Q2eS9YO7NSwUED JfCcqTdFWsIstG75NFruN8V05BDgTaGdoMzhffswT956t6Egk0O9Ba1AJ96JEuOL3V7Z1FMID8+C6 m5ffGHXZ2x+HBeyfbc2uhlBoZKyRkNWq+SDodEUTptulXPkRe409pGlPx5TG8yesRviAJMDlen6t7 zEDMXtQlbNjQhg840fgsKbLppkJW/F6t0Ot3EKomCMnyxyu3FcouqC1H+6OIJTp93dCp3UOoxhIOa 89C4MuA6l24/lLKfO+5q7+PmARqnZLxBCkB93B1gYRsqWVsxXshWBiSPpJ2niWUxdfBz+9ft9oqBJ jDJUfp22Cn8nMZ2oM6Sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq7gd-0000000HKb0-1Hwe; Fri, 29 Mar 2024 08:34:07 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq6bh-0000000H8dG-0FOg for linux-arm-kernel@bombadil.infradead.org; Fri, 29 Mar 2024 07:24:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=XqbtCYy6rKAgoCWJo/IDkaQi4Zmy7pvo/Tw1FadjoIk=; b=DHteTzr/cpo4FraJvto4HkwTni dmA12eZYwSimBivP9W/Ddk01pGJEAjoapwES0chNUg8b6D9+VVplvi7RKyQWXCr+Ksd1lLFZB1N2O CZ52ExDeFjP3DqA8jbYiT/U+7f5ezmk5U718m6E4bzLnOgta8/LgPUhq6agf1YRv35ERUJZ3vViit Xkwo4GxquvNv4lMMvyfMvsw4mvotzXUh7Qx2NJXKbpflEX9RhFyTyojY8Lpc4ov+j2EXTLqa9sZtk i9jxY9UNgishN6++aPDiluO0f/S9yu+Xa718jtZqOzDsRFqX5DBcQD7fVsHcUqFda8+Xx4PVJh4Zg s4qtGSHA==; Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq6bd-00000001QqJ-3KU7 for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2024 07:24:55 +0000 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-5cf2d73a183so1983427a12.1 for ; Fri, 29 Mar 2024 00:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711697091; x=1712301891; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XqbtCYy6rKAgoCWJo/IDkaQi4Zmy7pvo/Tw1FadjoIk=; b=Y2cRgk3iJTomtqVF1uFgqfsQ0epoTyaftYxyUOb5GKjp0rHXxTyd5jy2Hh7nAjH4ti ENpWLUtJ92sINnNRvoMVhBNK5+VJG1XfsHkOhLb2gW29+AnBsaClllhXYYM2zA6zuCuh upXgP9d362eNPNnyUUHZKRCjTIIg6dAOICq0fQO77l4kOq6E55WcytXRUGVVYRIJ1hwi 2wMse3/QaL2CQq4eiefqOh4+sfzfKefUWevgFmk66TcEMOGjxGUMUvTK9DzyoxAggO/P iAjoZqxrJjd2MZnWWgDz9xCz47mHCfLOc4xe6AQ6MsaibMUALeRWmc8JlykwF0NbRX3J JwoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711697091; x=1712301891; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XqbtCYy6rKAgoCWJo/IDkaQi4Zmy7pvo/Tw1FadjoIk=; b=iMoNgPth6aAH8rXLDqWe/6nOqRNELnZMilrguTr1w7v0slQ4aqC34B+/9K7yUM2xQn 6Z6oAmwng2jTZoUA0O8tjAajcKyhSwC63j60MVEMxq90ajm6kcfjKNoY9GyaJ8gMRcwm R3XzqfaOfrEcynECemARxcqrJa4hXiQfkN8Dc/AGLAnNaMxIEqU79BQHrONnbp1yAU+r WqRuHaBtFYxmO3nEdlOtxviL4sguG64L0mhKBEYH53yqj08gH1qparHNFTZSPWw4zcBS j1SF1Nh9xYwnMmISpk/Qr3GKt4HqUibzk2eLvkyX3Rd0nJ+LSUcbQHoL5g4M6YnuxBkI Qe/w== X-Forwarded-Encrypted: i=1; AJvYcCWDy6rEOfe4BhuwM1LsrTY8alw1p1Is9XShb+ptSDawv68DPX6j4Ff4NUNlQXyzWYSa29deZe9VmicTr6giFL4AOSbwue5/Ry3F02L3gHZDcZGhO/k= X-Gm-Message-State: AOJu0YweBdtnE7bL2+EJpw1MDq4asRPhGcH7pWIyw3ZpTnpVZsj62Zic cz0mouEHvfCthMd2Uw/2uPAaEeqbiQYwsF3JU65ItBpcpEzpN5ogfvRtX0Uyrcc= X-Google-Smtp-Source: AGHT+IFpgVY+di4cvDttsjDdGENlsS7ZbuG0wU7DGKwYbCO2yCZHbkcZgR0Ijs83aSucHtPBLyzxXQ== X-Received: by 2002:a17:90a:d588:b0:2a0:3b1d:7c5 with SMTP id v8-20020a17090ad58800b002a03b1d07c5mr6633406pju.3.1711697091135; Fri, 29 Mar 2024 00:24:51 -0700 (PDT) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id b8-20020a17090a010800b0029ddac03effsm4971798pjb.11.2024.03.29.00.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 00:24:50 -0700 (PDT) From: Samuel Holland To: Andrew Morton , linux-arm-kernel@lists.infradead.org, x86@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Christoph Hellwig , loongarch@lists.linux.dev, amd-gfx@lists.freedesktop.org, Samuel Holland , Catalin Marinas , Russell King , Will Deacon Subject: [PATCH v4 06/15] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS Date: Fri, 29 Mar 2024 00:18:21 -0700 Message-ID: <20240329072441.591471-7-samuel.holland@sifive.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240329072441.591471-1-samuel.holland@sifive.com> References: <20240329072441.591471-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240329_072454_045974_04818DB6 X-CRM114-Status: GOOD ( 11.88 ) 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 Now that CC_FLAGS_FPU is exported and can be used anywhere in the source tree, use it instead of duplicating the flags here. Reviewed-by: Christoph Hellwig Signed-off-by: Samuel Holland --- Changes in v4: - Add missed CFLAGS changes for recov_neon_inner.c (fixes arm build failures) lib/raid6/Makefile | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile index 385a94aa0b99..0e88bfe6445b 100644 --- a/lib/raid6/Makefile +++ b/lib/raid6/Makefile @@ -33,25 +33,6 @@ CFLAGS_REMOVE_vpermxor8.o += -msoft-float endif endif -# The GCC option -ffreestanding is required in order to compile code containing -# ARM/NEON intrinsics in a non C99-compliant environment (such as the kernel) -ifeq ($(CONFIG_KERNEL_MODE_NEON),y) -NEON_FLAGS := -ffreestanding -# Enable -NEON_FLAGS += -isystem $(shell $(CC) -print-file-name=include) -ifeq ($(ARCH),arm) -NEON_FLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=neon -endif -CFLAGS_recov_neon_inner.o += $(NEON_FLAGS) -ifeq ($(ARCH),arm64) -CFLAGS_REMOVE_recov_neon_inner.o += -mgeneral-regs-only -CFLAGS_REMOVE_neon1.o += -mgeneral-regs-only -CFLAGS_REMOVE_neon2.o += -mgeneral-regs-only -CFLAGS_REMOVE_neon4.o += -mgeneral-regs-only -CFLAGS_REMOVE_neon8.o += -mgeneral-regs-only -endif -endif - quiet_cmd_unroll = UNROLL $@ cmd_unroll = $(AWK) -v N=$* -f $(srctree)/$(src)/unroll.awk < $< > $@ @@ -75,10 +56,16 @@ targets += vpermxor1.c vpermxor2.c vpermxor4.c vpermxor8.c $(obj)/vpermxor%.c: $(src)/vpermxor.uc $(src)/unroll.awk FORCE $(call if_changed,unroll) -CFLAGS_neon1.o += $(NEON_FLAGS) -CFLAGS_neon2.o += $(NEON_FLAGS) -CFLAGS_neon4.o += $(NEON_FLAGS) -CFLAGS_neon8.o += $(NEON_FLAGS) +CFLAGS_neon1.o += $(CC_FLAGS_FPU) +CFLAGS_neon2.o += $(CC_FLAGS_FPU) +CFLAGS_neon4.o += $(CC_FLAGS_FPU) +CFLAGS_neon8.o += $(CC_FLAGS_FPU) +CFLAGS_recov_neon_inner.o += $(CC_FLAGS_FPU) +CFLAGS_REMOVE_neon1.o += $(CC_FLAGS_NO_FPU) +CFLAGS_REMOVE_neon2.o += $(CC_FLAGS_NO_FPU) +CFLAGS_REMOVE_neon4.o += $(CC_FLAGS_NO_FPU) +CFLAGS_REMOVE_neon8.o += $(CC_FLAGS_NO_FPU) +CFLAGS_REMOVE_recov_neon_inner.o += $(CC_FLAGS_NO_FPU) targets += neon1.c neon2.c neon4.c neon8.c $(obj)/neon%.c: $(src)/neon.uc $(src)/unroll.awk FORCE $(call if_changed,unroll)