Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp914705lqh; Fri, 29 Mar 2024 00:26:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSmcrwru14dqnmZZGl6eKX/+dZkYwmT0saw3slsPmcV/LXEJxZvnZ8ELT/ImEOrfHvQaX9ISIohHjqScdilcJ6v6kH16JxJUtGePHGSQ== X-Google-Smtp-Source: AGHT+IEq69T12BQHAdl6oDcIEBpRbbK7tvRByA1Izclv7dFjGMstcSJxAB1Ehiqs7wgJVh3SEsl6 X-Received: by 2002:a05:6a21:6d94:b0:1a1:6cf3:265b with SMTP id wl20-20020a056a216d9400b001a16cf3265bmr2307511pzb.18.1711697170830; Fri, 29 Mar 2024 00:26:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711697170; cv=pass; d=google.com; s=arc-20160816; b=waoVeUo0QWxUX0bk/Pufk+/rrAOx61tGGJz9vd8eGGx75WDycAAxrSl61q4lV2D/9S L574d6vKrNvU932f7l4d8ia7KEF1QRHWjVcVOUsXrBXWB+WBsJFFPPVvnaGz3ure8t0h ce52r6Pogv7j59hSiOjERQC8EvEZh0mXL3mwWe3ofZaEguav2uuQlFd3zMN72Np/HrBD 3IfqqJXXiKFT8PKPbMtEqNaiKMeNsVEjia2MtTKZ/eipyEAq0X+E7YaOklMWm+N+sPG4 qFW4tqXZa2/Ye8Nl7jAHncX5AjIvgQZiBz2bhFqV/6Bx2vs3Dnu0Z6u2XQ2VONnYPB94 x1qg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=XqbtCYy6rKAgoCWJo/IDkaQi4Zmy7pvo/Tw1FadjoIk=; fh=CEOavXBdi7Y0Ec85PQEEe2ovCu7WdLdELCDiJuCxDqs=; b=NCIi7sbTiLTJr5Wx+WJAjNCsML1ImUDIFmjEn+3Ku+9FYuTF8O0NZacvKzQreXf2eC r7fHTCJWKQF8KqyHZ+wnqKAKs6mTWxwn/KhlyC9mGMCNfvarkhaNGlFvHXAacRlfCikY uItbS4Tuh1P7suKTOsdQupJG3puqrlLZusHsVQ07uI0xHqK+HOsCrNgrTP4tPsLakTh2 nHfYfFcT5UHCuNX3/RCQPHQD1c7dLpoW/HLkfALzL5lgNChGxKLnQjNqZV2klghZwKl5 0owaPsmjyPfQUF4d7cr5eQI4/2ja4y28G2ffRC0zwK59pIaP9wFiYhGCZR/eLb4dSUo1 a4yw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="AxAST/U4"; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-124233-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124233-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u30-20020a63471e000000b005e2707e975asi3065360pga.174.2024.03.29.00.26.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 00:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124233-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="AxAST/U4"; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-124233-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124233-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 81851286142 for ; Fri, 29 Mar 2024 07:26:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35AE740859; Fri, 29 Mar 2024 07:24:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="AxAST/U4" Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B567747F48 for ; Fri, 29 Mar 2024 07:24:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711697093; cv=none; b=FrJQZqSg+Qu2rUNG33/ZMvqIXW9bSeK2nZvdtLOzIHdVat1q0RjQiH8xbXnA109lpujQxiLMZnPTbR1TrNe0bBySPm7NCQVU1xtsnMq70Z8IQ/1rsoIIL1SuukLh7ZDiVkzFMMIeB6StYvQXmBrKM2c7IoQTDmhLQIFM7XDW3yI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711697093; c=relaxed/simple; bh=gxAW0DTrkLtRtKQJA86gMhjr+tKNdgSukt4KSi/OgcI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Lh1RimsZNoe99o56ac9M4+uT1EXAALHQUomQvq0p2ItakErnFDdRBpzUyFoFaBHw9Cf0u7jnRgCPduIIRCIi1alPKz9uOioHE2UTgJIN1/I4l82mIIFvZUxtNDHmFvUsZjaBdiu1i5wcPcXVhIA0cFJPQvPXEmXCk8mZ/tVegik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=AxAST/U4; arc=none smtp.client-ip=209.85.215.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5c66b093b86so2043431a12.0 for ; Fri, 29 Mar 2024 00:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1711697091; x=1712301891; darn=vger.kernel.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=AxAST/U497xjGykVJDQvhnMeDzd0dLvtTxtiRbO83g4AIHBhVhLkurVPr1EHb+fmvT xFRSY2emLL2CM3qn4XuI5crOsXFAXGKGwW4BSgKyqSIWF6z7DAAGFa9nGXs6H4YkfiBQ ZuH3ueFn+tk/Mnm2IuecSuiAWFuWOqtIeXqUrNtlQAtcq9kB0eJU+JV/Ah8vuFaePHcL WED0U/ZuPHxEK6q155ciLDDsjVd7gpSRsG3TrzmnuP97d2B1rO6obc6YpME1k8/f5cfz 2VZ4aguZtrj1qm6mjK7GxCbJYoMRpX+l9oJ15/1o8N4vbJzSBFEHF16zSJVclHXHai8e K80w== 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=mahZJItP02K0dieHoHzQiT0jNsr5IwFt4ViuBmZtk2R5+YGXW1sHkRQap2Ys5bHnbd oKweLQVGDoGI/FIRIjA0rLR3M50a8efvVTwAuHXsBIV1E50NHiXj5IvQpicpv8RMeRaj kk2oIr6I0V2aC0wp//LJPAEIkuXtK0b85nTAOaLR4PQCV/Wa3/Ij48u1rjyNl4VKqCOi jEMfU0Jgz458uUu4+C3+3YZC9ox7JWF8Gk6p+CH0adHUBIcIYJkgX0oxswbL/t9HbM9Q ds74E1iTx3hM9ip7rLYnRvhF4CjA7fmgZ7794xGr30v7E8B9MAXgHdkHLiiYJpqSmxdj gpoA== X-Gm-Message-State: AOJu0YwaWOou+RnpHNcFSVWUygC1Y9pXaiUTZXKJoY3VHx4cMvbZuuEk 7da2AeEC7JKCQAgEYad77umJHnnLT9KZ2SZxDAflaqplVPSEycFtzdYmXLEM42g= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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) -- 2.44.0