From patchwork Fri Dec 8 05:54:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13484860 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 6EBC3C10F07 for ; Fri, 8 Dec 2023 05:55:57 +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=x52gPLmBbBjDuRjXx8rCw1yK1kwTormyoSZJVwihxqw=; b=MKFRhoxShdrwGr G27xIkOyfIB5raQNC+8s9jAIh91lR/TwOwdM819/x9JePreG/EbM9jnDp64rJ21A3u2nFL/lro6OG xRuQ1ib0iTcH2MNYbgrzPyzAtSiVIZqHxPcV2p/X5ylWBoIgD6JwL+Vstb64n5t90uoivwucaKzuF 0lqkstwJbKM+jhTSDVKWIrTBuEuSKckYdv1BieVqFpHp/rRz0IGhjpwE1ZUEazCCT35fAoP+rmpeR bhbor+ovawSouYopSQ3wXFRIoKqD6T/5BpDidarIU8xlsTTbkeiwNFrIqCVUT9GunNz3SLU877q+5 UoN207x21r/LyfPYD0tA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBTpd-00Enjn-0w; Fri, 08 Dec 2023 05:55:25 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBTpO-00EnRY-0C for linux-arm-kernel@lists.infradead.org; Fri, 08 Dec 2023 05:55:12 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6ce94f62806so1087045b3a.1 for ; Thu, 07 Dec 2023 21:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1702014909; x=1702619709; 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=oJ/tAo5hDwQPfRruz9afcRfXvkx00dxKddYKFVNcdvc=; b=jccfBESigWBjLCt/CBzQ5AFtMf/HijF3glv6eAocD+mJ2bzBWKnookAWCkrBs2BqR5 +WzLQCEJURCdsFOHo1jG32gvs+teGNnII8qBdvveaobQ4i7bCZ7sHZtgehO8wa0MsVC9 KPQa7PqTB3EX3M8+tEO5J+Hz3+Ou8uTFhEWpGCCxsBI3dis2yzdusKDiLxBSE8DqB3Ma oJkkTvC2TZjLNsmmmxSc6Wivcj5WjpwkhobmdS2gBQYA7nFl/EK5E3JKgNU24aXaduKk 8cpTCKJhzdaXjNZWqx2N8/Yx/6J1Gz1QGeJv7siYcO5lyPF0KT0HZaLN7CAkcA9O8MQ9 HsiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702014909; x=1702619709; 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=oJ/tAo5hDwQPfRruz9afcRfXvkx00dxKddYKFVNcdvc=; b=PXDx6Kn9Gm+2/8vOudHBW3pWW7yv1RLd3DJr2sxANL3DC/OnUwAm7Qm1sEP0hWzoAp 4gsqlyEVwYWAuws9/h/kgr/6DVVAJd18wyuh4jjz7Z+C45c+ds4T6OvopdzFNgO6ycR+ REFJJPRnhn2JQ2Ly9kSJqSBJCbYAhzHhNjbyUvIqUnoa9p+kzz6T/FY0ZvaO2+wvCFDn 7C3rGEo82g7IrTuCXlsiF5z1fm0qWfrjdugNK9+sICcAagTqv8sDgf5eRr3Pbxiej981 uI6wE2d9XhjgbXKjG5HlFZT8jkbkbgK6g5ru0crySm3XiChynqYB9mOrGU+ro+goFUZR RcYQ== X-Gm-Message-State: AOJu0Yzy2tA3rtPoUucq1+dZXehnU+CzHq42beQ4Cq+fKvjz/x31zIyk BA/UP+RJMb1/vglnlI1EEYnxjHbahGw2j8dsWWxBK2yYDd10QPh/mYbMIxTQ1QrafSegven8IPp Y8+/fTBPyCy9leLpDkqPrtKVC+stc/Gi/63I8paa90bqBY1XTR+4rqu24doTEwcEJb/ud/nyRzL 11nBpVwQLFxOZpDdSvaOfsdsQB0g== X-Google-Smtp-Source: AGHT+IHgMEmtold3cNsq0/10/gSamuXTn7dqDmNr7pkUJjR3cZZJuyMG6U/Bp0CgIPL33Lkbwgh+tw== X-Received: by 2002:a05:6a20:4282:b0:181:74fe:ba83 with SMTP id o2-20020a056a20428200b0018174feba83mr4264495pzj.40.1702014909013; Thu, 07 Dec 2023 21:55:09 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id s22-20020a170902989600b001ce5b859a59sm786250plp.305.2023.12.07.21.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 21:55:08 -0800 (PST) From: Samuel Holland To: linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-riscv@lists.infradead.org, Christoph Hellwig Cc: linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-arch@vger.kernel.org, Samuel Holland Subject: [RFC PATCH 05/12] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS Date: Thu, 7 Dec 2023 21:54:35 -0800 Message-ID: <20231208055501.2916202-6-samuel.holland@sifive.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231208055501.2916202-1-samuel.holland@sifive.com> References: <20231208055501.2916202-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-20231207_215510_123501_CC3E874A X-CRM114-Status: GOOD ( 10.27 ) 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. Signed-off-by: Samuel Holland Reviewed-by: Christoph Hellwig --- 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)