Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2716480imi; Mon, 25 Jul 2022 06:32:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tcQAbQM00hFNBuh1eKGBEuavPTNRPrdnmLgfhcx4GH/cAqefBJDBBg1ofU0nBSaaxA5inJ X-Received: by 2002:a17:902:cecc:b0:16d:3fec:22fe with SMTP id d12-20020a170902cecc00b0016d3fec22femr12663974plg.96.1658755963983; Mon, 25 Jul 2022 06:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658755963; cv=none; d=google.com; s=arc-20160816; b=BR1OZC+N7CkAvna85Pk9HtJ2cIXORVn085pTIVtyl6M/XJGb9Fi6RPE8TCUpzMkRQA 4DHP3nfx9MDubSKD/RQyTKrDxZ0XanL7TKkzDo0dLwToTY04Z95RH7uqePJMnx8usq4A 3zyB0a4SXwwKPCfTL4op6B3dx9FJXwvG0+k0nlRa+/xKyM7MTA2zo/8FRAuTQp6b9ILQ mdZPK8VmHGv3S3Zhvo6+x9dM2aFTCMdYcqApb0rb/BMLmUzj+LuI0p4bxyHbnR5RcfzN ZMGpCxhbnnz64sQNP9oXB02Wuuo+8idU4BAhvZMjYzeN4vUfvavIgOj1dT+CNl8MOu1v JLNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NjFjZ3PKZ43f/F6JeLTjmG6fPO97sONox8SsxdWWqNI=; b=aFFxjEsQqstsAp1KT7XuXKrLNwzan1b2kv08/GxVpTicnvDHqzXcKDyHKOMBbzEJyF VwZx3EqFQthQgjKP6INxCb/6BhZezIIrCi7fAPc0c8LWReWfhVNBrJtdCp2cXAJVruSR YjuoWR9qs1bd5o4gvVFVPh0/mzxx3wvuHriOChDCL5xp8dEZyPqcFX+e/j2jSPB61BFU DGZE00CGbL5UtOyIdpA6m31A3ypPNQHn4VQBazdO9PV4NKcHhuiRT3gvP14FHEylfVGE GuFbw51Uv0VVJvYFDYBHqEn3zYNujsP8lkF85JHo6IxRb6kf5nu5GvMMjx83SqcGccUn YHlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m6LX9br5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j17-20020a63cf11000000b0040de29fae99si13854389pgg.540.2022.07.25.06.32.28; Mon, 25 Jul 2022 06:32:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m6LX9br5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235341AbiGYM4I (ORCPT + 99 others); Mon, 25 Jul 2022 08:56:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234936AbiGYM4G (ORCPT ); Mon, 25 Jul 2022 08:56:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F257BF62 for ; Mon, 25 Jul 2022 05:56:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 28682B80EAE for ; Mon, 25 Jul 2022 12:56:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D731EC385A9 for ; Mon, 25 Jul 2022 12:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658753761; bh=Ocs5hztpzo9hNvSzYVdqDXeQpBIVga6VGoPNKHQ7rvA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=m6LX9br5ws7ghvLQfKL8jZ5FqaDjyouTtOMy5blpWWF0O5Kc0zGg0mxPfQYvV8Gmz ON3TEuu74RKD3GFSIUIz4gxZp0STVzw+d5Aa0r9SwKf7aC7zVF+xpnwQ+7qFKUkpN3 kLA9uRcpRl7yyY8DTbRbEc1BzHZ5esC2pgTeXk7POcUdtUff/M7g0ZV6G5k46JZW3p x0AkxO1Ue5eAYzY2xLVWCWI/FpmvHIY65z8sG2D0RCnae9GmhxltUAX7JdxSHznOgP DZDzrz68YYqmFAnPwmqofiWm5V5aWIqLNsrpKIUwwoyAyMgvEmAJQ8TuXfzjyA4+EV B/9cd8uzmIDJw== Received: by mail-ej1-f47.google.com with SMTP id sz17so20410693ejc.9 for ; Mon, 25 Jul 2022 05:56:01 -0700 (PDT) X-Gm-Message-State: AJIora+lYO8g+LgTmpqce9G9W3KhCKiOx4XWi3XvcoAjxjcRVLM6Uwev XPuAjN5y/EqK6ZlOsSHMk3zyUbjaxPVHVM1cLAQ= X-Received: by 2002:a17:907:d0f:b0:72e:db1f:9b91 with SMTP id gn15-20020a1709070d0f00b0072edb1f9b91mr10174393ejc.470.1658753760025; Mon, 25 Jul 2022 05:56:00 -0700 (PDT) MIME-Version: 1.0 References: <202207250449.BYMZbIA2-lkp@intel.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 25 Jul 2022 14:55:44 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-stable-rc:linux-5.15.y 6874/8723] arch/arm/lib/xor-neon.c:30:2: warning: This code requires at least version 4.6 of GCC To: Ard Biesheuvel Cc: Greg Kroah-Hartman , "Jason A. Donenfeld" , kernel test robot , "Justin M. Forbes" , clang-built-linux , kbuild-all@lists.01.org, Linux Kernel Mailing List , "Jason A. Donenfeld" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 25, 2022 at 2:41 PM Ard Biesheuvel wrote: > > I would love to backport this as it bugs me to no end on some various > > gerrit systems all the time. I'll look into it later this week unless > > someone beats me to it :) > > > > If backporting is an issue, we could just drop this warning - GCC > before 4.6 hasn't been supported for a while anyway, and Clang never > had the SIMD accelerated XOR to begin with (it needs the __restrict > annotations that the parent patch introduces) The other easy workaround would be to just turn off the xor-neon code when building with clang, e.g. using this Makefile hack: diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 6d2ba454f25b..8e4fe6421dd2 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -43,8 +43,10 @@ endif $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S +ifdef CONFIG_CC_IS_CLANG ifeq ($(CONFIG_KERNEL_MODE_NEON),y) NEON_FLAGS := -march=armv7-a -mfloat-abi=softfp -mfpu=neon CFLAGS_xor-neon.o += $(NEON_FLAGS) obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o endif +endif As far as I understand it, without your patch the code is the same as the generic version anyway, we just never turned it off in mainline this way because the plan was always to make it work. It now does work, and for the stable kernel the mainline patch would only be a performance optimization that we normally don't backport. Arnd