Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp689225pxb; Thu, 12 Nov 2020 13:52:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxt1Fo1wfndIWC4s+FDtc0y4F2F+G6C7Kz9xnWY2nYV0rqcwMXNfRUx10jpBN22rEyKv7k7 X-Received: by 2002:a17:906:40cb:: with SMTP id a11mr1425618ejk.217.1605217977276; Thu, 12 Nov 2020 13:52:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605217977; cv=none; d=google.com; s=arc-20160816; b=mzrSn+uer08Lh1IGArqC3RuYi7ejVlsX7NRNN/bGG1ODre0OPtPPYP2T0wXApzvshF U1MWVOV53VbQqArGjbMkuft997YnsoPVRtXuEIQ4oQbP5obmwMgDEIv+JkJzWEqpu0fP ktOwgSFvpj0c+GDLIA1xEosIQUJAtGy9RS9DkCM+4ESIjZmd4FvoPysfzl0MvCl+D/6V aqYjscNdOyV1C/wpGLPrLSHw/hU0rWRwUFsFFuANWPSXaW9JmVV41SsCchpDk2m+ffuH FlyzNvKF/4eiXZEu0nzCOpt/sHrecdRd3JFTtz+FHnPs2vk3lxJxDBiLc47OXRrz2wZU JOSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t9uXZCibzviLXlkgFY4GlBUcWyC+ILxJ08Y+bCgohJU=; b=w/6kOPrqzmj4O18wOFyqOQ4BlMYzRlLmn3XuoEvkVTDLrgNyoI1b4J2fpWtX67aqWv eND3xXYKFxyGrZmaEE2jG8tQsgqOnFlU3AhoJW8qklr6lx/P0Ti//fGrN6duEiBrznm3 iUSs22cJwtGkWrxSRwORC+okuPAMzDwIbnr232dmzfVbRnnGtqXaxjEA6ruQwiEkUPs6 0llsVTHjejZvT9cmlBxXew4guXhOi1QEtguppxywe1faXMXmuLMhjm4JpCG20vv0tKVh CkbP8GdDZvcTlzzshvzDOCQ2UcOFrV6KPDLGksaYSB/5y1I9SFfU+T32b/7qDO00DRC5 TT+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VyGxocSm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si5328739edb.93.2020.11.12.13.52.34; Thu, 12 Nov 2020 13:52:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VyGxocSm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727379AbgKLVur (ORCPT + 99 others); Thu, 12 Nov 2020 16:50:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727175AbgKLVuq (ORCPT ); Thu, 12 Nov 2020 16:50:46 -0500 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 083E7C0613D1 for ; Thu, 12 Nov 2020 13:50:28 -0800 (PST) Received: by mail-qv1-xf43.google.com with SMTP id 63so3624785qva.7 for ; Thu, 12 Nov 2020 13:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=t9uXZCibzviLXlkgFY4GlBUcWyC+ILxJ08Y+bCgohJU=; b=VyGxocSmPg4RrrGNwXgWztdjbpB73rGxNVKmW+2IY6Egk1yzOg40htvWXAB4naQnu/ l2n0HX7ghW6xjkoVRopg/KjX69zGaoEDNm5eY+7Ma6iZ+D3vkL17ZcTECxqcZoZxp+Uz iE0631W6P6SaIbr7TNMPqRlhGaAAT96lLMXJifjjHbw0WhP2wx7QhuBT/YPfL0XSN1LV RasrnAFj54wOXI7wTaxrs7CMU9/KyrMO4CGnJWlcywhxFUZo0RwTSxVt+HL45SiyM0P2 dwb79kAqyef1KwfAhOGkDC9i2ZhL9Ca6sX3WBr5pEp0cpmYgp1arsy1yvLpnftjEOIX5 7CvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=t9uXZCibzviLXlkgFY4GlBUcWyC+ILxJ08Y+bCgohJU=; b=X4urTyBoYAcZa4Jk5hif7F57xmsU4HMLPHUMyb6IRD+eERNIDgsdUeZEOMR6dMWRer GSpoCh9BeM8vKVmsWF/e7r8DnRyxUVjauHDZg2Zi0rM5DgeTR2zI1MDrkPZ7vEns+LO7 I+b4ljIPCajYK5yYCj0j4tC/1V30wCLZaE7IYwb7IMDrwiy5naoNAP+4va1jKIqZhk1M Dx18ekFNjHr9QyGA1iFzuCerGPnef2dHBoghVesrNaJSM21SPa8D/HA22+JWQOKzc/hL 6+sy/KWT1INFwUD++GTPEGYqZglCKXnDLdncBL8khAwwRTHwbpfDymeb4lJDDlQtKiXA 8UuQ== X-Gm-Message-State: AOAM533hreDwd0A2QpCWi2KsaHaFFlqEhWUUA4M4vVAoqYxISvENoYCG jOpl8dXm/CeePWG0NoLwxfY= X-Received: by 2002:a0c:b65b:: with SMTP id q27mr1836700qvf.8.1605217827183; Thu, 12 Nov 2020 13:50:27 -0800 (PST) Received: from ubuntu-m3-large-x86 ([2604:1380:45f1:1d00::1]) by smtp.gmail.com with ESMTPSA id l3sm6045092qkj.114.2020.11.12.13.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 13:50:26 -0800 (PST) Date: Thu, 12 Nov 2020 14:50:25 -0700 From: Nathan Chancellor To: Adrian Ratiu Cc: linux-arm-kernel@lists.infradead.org, Nick Desaulniers , Arnd Bergmann , Russell King , Ard Biesheuvel , Arvind Sankar , kernel@collabora.com, clang-built-linux , Linux Kernel Mailing List Subject: Re: [PATCH v2 2/2] arm: lib: xor-neon: move pragma options to makefile Message-ID: <20201112215025.GA55620@ubuntu-m3-large-x86> References: <20201112212457.2042105-1-adrian.ratiu@collabora.com> <20201112212457.2042105-3-adrian.ratiu@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201112212457.2042105-3-adrian.ratiu@collabora.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 12, 2020 at 11:24:57PM +0200, Adrian Ratiu wrote: > Using a pragma like GCC optimize is a bad idea because it tags > all functions with an __attribute__((optimize)) which replaces > optimization options rather than appending so could result in > dropping important flags. Not recommended for production use. > > Because these options should always be enabled for this file, > it's better to set them via command line. tree-vectorize is on > by default in Clang, but it doesn't hurt to make it explicit. > > Suggested-by: Arvind Sankar > Suggested-by: Ard Biesheuvel > Signed-off-by: Adrian Ratiu Reviewed-by: Nathan Chancellor > --- > arch/arm/lib/Makefile | 2 +- > arch/arm/lib/xor-neon.c | 10 ---------- > 2 files changed, 1 insertion(+), 11 deletions(-) > > diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile > index 6d2ba454f25b..12d31d1a7630 100644 > --- a/arch/arm/lib/Makefile > +++ b/arch/arm/lib/Makefile > @@ -45,6 +45,6 @@ $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S > > ifeq ($(CONFIG_KERNEL_MODE_NEON),y) > NEON_FLAGS := -march=armv7-a -mfloat-abi=softfp -mfpu=neon > - CFLAGS_xor-neon.o += $(NEON_FLAGS) > + CFLAGS_xor-neon.o += $(NEON_FLAGS) -ftree-vectorize -Wno-unused-variable > obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o > endif > diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c > index e1e76186ec23..62b493e386c4 100644 > --- a/arch/arm/lib/xor-neon.c > +++ b/arch/arm/lib/xor-neon.c > @@ -14,16 +14,6 @@ MODULE_LICENSE("GPL"); > #error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon' > #endif > > -/* > - * Pull in the reference implementations while instructing GCC (through > - * -ftree-vectorize) to attempt to exploit implicit parallelism and emit > - * NEON instructions. > - */ > -#ifdef CONFIG_CC_IS_GCC > -#pragma GCC optimize "tree-vectorize" > -#endif > - > -#pragma GCC diagnostic ignored "-Wunused-variable" > #include > > struct xor_block_template const xor_block_neon_inner = { > -- > 2.29.2 >