From patchwork Thu Dec 28 01:41:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13505556 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 E2CDEC46CD4 for ; Thu, 28 Dec 2023 01:43:59 +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=KMEfzF+r6uaBTe17qKCq/GS6d++4YfhUWclLyQ1ow34=; b=Q4Wch2M5DRwkOv DZoYMUKw2ATvH9V7KXmQ/MqJbtYiQGvd8FzDGNtMs3r1soV4d+lURb8HkljF33yJkwV/Vp1FhjTTf cmux/Mczojto4vcsKQ3IEKTNhreGKOgdu9T0/yQQ2Er7DHYyqkZEMX1P16N8MomwaFc9q0ubkhBgd cteBXAXXBsmzqW0QioXz8ECpaN++9Pf18fGCLCBLah+fRrWcHCfj/b516u8RvK69080nx6K3Ev31O rusCYvrHteak6xu651Qn4vO0jtzwvxRDFTG06KFQItihDaFVj0qReE8JK1eNghNwQ6hooOgSPT1T/ wZWFWAlkm5EtiAKNMlIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rIfQq-00FsZu-0p; Thu, 28 Dec 2023 01:43:32 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rIfPq-00FroG-2f for linux-arm-kernel@lists.infradead.org; Thu, 28 Dec 2023 01:42:35 +0000 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6d9e62ff056so1449787b3a.1 for ; Wed, 27 Dec 2023 17:42:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1703727750; x=1704332550; 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=5jd6BNzjMN3b9R+N9FmyfxlTWIL2mCpzUIRSa4mv1F0=; b=ei+qQh+Mhinnda5sG5ZDYgK6J1hbU1PZF5EurPHUChrXL7SAkNdymOz3mUq7lGwanZ GbW+h+SotZ7Udcz71qYp7RplsGCpQflv8UNfmhqYp6ui+b5ILy4wetuou7kK0WBTl3Hr r/HHz2spFudYQudC6jbGxlva7a5cHuiqVGs3MdZEDBMUNAfEAkwmEhmLHR1wG+jIsLwZ QGOJBYxIEWqidiAE8UJNGLPkLuArFmeHeTZwAfaDPM8b8OquNoF6eytkHDgPELPr5bMY qHLGuhpdPmf8y0ZvcCGz56eqxDf+z3GRDh35TGB2k1jRHPNKHM2J0wLDmpNZ0kIiFfZB 2SYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703727750; x=1704332550; 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=5jd6BNzjMN3b9R+N9FmyfxlTWIL2mCpzUIRSa4mv1F0=; b=Mxve34WlFjZvidfyUZYxh4XHF2hula4IS57v4ymUfI+eAYtElBvME47IJ/M5PaJn4E PM/bMcDX47JxHDB5aFAixaSTiAf79P3pwesFmIULhhLfIP9FVu0z+eaEQXAR5VC/hFrp +jhoDb+sh2jIMTNdbaAYVXEK5dQ3HJ2ujBOS1/F4PD9lyswRj/UcxCFzoAg4Tr9nItNn t/7syUlShCr5Vvn0wfFH3S5LFKfoZnMNLTsI2Di93nptizedBDRRdSzRcJz3uT91UHlN uGkfhD3wrP35S4IrWy5FCzSAAfbGYSimgbuGSnr20p/j685Q8D8xahALxreExHcmohWP tjKg== X-Gm-Message-State: AOJu0YwaMHyh8TyV39U71+obbwNg8f5PPjaKEUNI5SWkBZp3A0romM6w ZbzEhTDJ3Vq+U77RfxnBvllr/Utpg+sOZDIKcTUdo5E+Xnxr6Kdp8VXpgUnDQNrgsbNc2bIf1YC rsgO9j0unEseWMpBFFsZMvGSTIL8yEFH2NqPSuO7KzWDbvzn4pZv6GXVLkb12koXKw8oyYZ2W3n 8u4i/hEBHNIMk8JkYbRXr/zk1TqBaPTgi2tQ== X-Google-Smtp-Source: AGHT+IE0nmjtDXMxXkCsxA9jA/OWEHDhYnPM1dnj251PyNU2gTBGhxX93h+FmlGsyJJp6FOxSnIuVA== X-Received: by 2002:a05:6a00:214d:b0:6d9:f66a:b5f6 with SMTP id o13-20020a056a00214d00b006d9f66ab5f6mr2059083pfk.34.1703727750207; Wed, 27 Dec 2023 17:42:30 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id g24-20020aa78758000000b006d49ed3effasm7335440pfo.63.2023.12.27.17.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 17:42:29 -0800 (PST) From: Samuel Holland To: linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-riscv@lists.infradead.org, Christoph Hellwig Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-arch@vger.kernel.org, Samuel Holland Subject: [PATCH v2 06/14] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS Date: Wed, 27 Dec 2023 17:41:56 -0800 Message-ID: <20231228014220.3562640-7-samuel.holland@sifive.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231228014220.3562640-1-samuel.holland@sifive.com> References: <20231228014220.3562640-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-20231227_174230_868830_EC41DA13 X-CRM114-Status: GOOD ( 10.14 ) 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 --- (no changes since v1) lib/raid6/Makefile | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile index 1c5420ff254e..309fea97efc6 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,14 @@ 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_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) targets += neon1.c neon2.c neon4.c neon8.c $(obj)/neon%.c: $(src)/neon.uc $(src)/unroll.awk FORCE $(call if_changed,unroll)