From patchwork Wed Mar 27 20:00:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13607389 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 4A7E0C47DD9 for ; Wed, 27 Mar 2024 20:04:56 +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=a+r52+9K+XzPXcfdscV+5EEU7WLu9Q0fuoJLgUCMkJc=; b=JLEVWzgDU1Fxva tRvBBAqmGVBIZcLQWohwKGDeUsy0m/VsANcl7p+kKWYftS5dzmjf3h1g/VMv4qpDG5pYv6tvPdM6z DuKbBA+A9CqY4mZd7PdFsN3vddV93mCJhCOI0985uGRKdl7Lqd2fgwlxswunJVWR7zccAzm1Lf+yE MJqFy6VhT73jiiua4+oFqUChDOWNZIJQrPRmWixJ9MKyzZtCyXMsfi0NzxX3lSCKgZHqRpF1M1ycF iJ2aesrsECw3olkOWVCt1SsWE3aIOMdDquO6JVDsyuLL+17cT6xF69m0b9cgmPg0XwgS3MsAtpe+6 XIDbW3/Izlmglw34Fn6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpZVq-0000000Avd5-2RQV; Wed, 27 Mar 2024 20:04:43 +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 1rpZTV-0000000Au87-3HeD for linux-arm-kernel@bombadil.infradead.org; Wed, 27 Mar 2024 20:02:17 +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=JhRrF1Pu1wTofDEF5NDtSjXNjQrJmyXSgj6gSsLdD3o=; b=kTtCt0c1Sw9hp6hziuZQniN2wa uGTurNDruvXDZAt3WrfVIUUcCCoIAyUKHcyUbxzk+8z/462EFBi5GMmE5Wmeg65/d1yDSThUgE12O flK0mQBazd44Bo1pzRURZbufROIVmlSCmJBx9e6qh47AK5zcGyb9TRRLY1j+cOeeJhOfIV7MlxgqK /Dtwey9B8Skw93CLtJ6gBRDMq3CW8DKdTw63Sw/kSUD4XDocNMAmBHjyR0sTeHIR6em4+C3p5Ok84 0Jpu8ms4Ybm3D1IgY6/1QamsYv+UIPqDi2bfiLoBnxKvk38GDu5jerLvv4jjkANLa7xW++B+4hUOo sxvYatJg==; Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpZTM-00000000Wpy-3vGW for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2024 20:02:16 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1e0f2798cd8so2273125ad.3 for ; Wed, 27 Mar 2024 13:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711569727; x=1712174527; 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=JhRrF1Pu1wTofDEF5NDtSjXNjQrJmyXSgj6gSsLdD3o=; b=bvBmJfk8irpuOzlh5TmE+RsuKxPdKZ8qdVCQi+68AcdyjzUrQygVrCaGM87IXV28NI 40fqYhowDQ/zkrGuqyVbFryg2h8EaDknwDNIyAP5y8CsMJqZA06IqfwxqtB/Gml0UUrd QDDLH+9ix2udXOmUhWXTsOd1fvtjPaC1sjirDOpm4JKGVM4FxkpEQy16TAC8osDfNvOZ MACaUdIOlqPN1/J6e/62iyTX1cuuPQJPf8cltLGeSE7hMxEx/1XtW5qp7z0XdgcOWhxG 1i97zGCsPIsdvKatOP3Zq5hyHMUXVyRpRTrhhD1snTSjG9RglFKkwwnqdnizw+werVBu gQuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711569727; x=1712174527; 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=JhRrF1Pu1wTofDEF5NDtSjXNjQrJmyXSgj6gSsLdD3o=; b=o2zyxKAk7LF8xi5r0w/oZTJIoxuJ+wp8bYVIBtUUrN1ccNf3j0EHKjh28diDlS3eDc 9BQk/2C8VTtQkzd23hSCMlUfD+LX608GiWBGkxJeYx+M7xQ0mKQtxbc88liUEqa3Lzf8 u6m4cvVkz1zLXd4W+c25p1MfvDZVOB3Twjk9sK53mB2xQCqs5Uncd81Awv63kZVgWKwK CBCIpjLfissO8o32VuOdiHkttv/j1YI584chVgbKbt3JZ7HiB0jo24TbnYtJy5qdabKl dcox8uM7i5L8YY1VxQoLTso4vzql3kxY2R25/mU50CrrJRhg00jlnIRoWMi/Sfu+Qn6s 9Mcg== X-Forwarded-Encrypted: i=1; AJvYcCWGN2VSCYUADuPZpwU9JSWLwIfX94ORB5tRGiC25y8X3wAKaVW9OsbHDPKzl7iVYhhoUaqw0DMzhAdFh13ewmHOsgZXHINTXnceAx8ug2C39NoXhog= X-Gm-Message-State: AOJu0YzlN+0dLmY0eSo5vC4sN+Q2IwrqaKFP3/C/7rc1Qo5LqrgOFURl xZrVlLeaOB15gs0pmDthVKdIJOgVJGbW+RdR9vKlkJ8o5VRZeP61IP6rGCIv2fY= X-Google-Smtp-Source: AGHT+IFTdj+7xjr/hkuUZrog62OKlzxWVPjf6p/E+DdPaik3Rv7nG00gWJ8Kh9j7qP1eqTQJrGE0sw== X-Received: by 2002:a17:902:650e:b0:1de:eca6:483d with SMTP id b14-20020a170902650e00b001deeca6483dmr724908plk.27.1711569726983; Wed, 27 Mar 2024 13:02:06 -0700 (PDT) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id u4-20020a170902e5c400b001dd0d0d26a4sm9446459plf.147.2024.03.27.13.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 13:02:06 -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 v3 06/14] lib/raid6: Use CC_FLAGS_FPU for NEON CFLAGS Date: Wed, 27 Mar 2024 13:00:37 -0700 Message-ID: <20240327200157.1097089-7-samuel.holland@sifive.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240327200157.1097089-1-samuel.holland@sifive.com> References: <20240327200157.1097089-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-20240327_200210_557240_7720B6B6 X-CRM114-Status: GOOD ( 11.80 ) 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 385a94aa0b99..c71984e04c4d 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)