Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4316330rwb; Mon, 31 Jul 2023 05:15:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlFleIZ4GEGQvFDxN7H5u+37CJgpm5GBmh5zHB84qUyBOCUonPweqlt6rUB/aAY9CkiTxU7i X-Received: by 2002:aa7:c2d5:0:b0:51e:309:2e12 with SMTP id m21-20020aa7c2d5000000b0051e03092e12mr7289023edp.28.1690805705880; Mon, 31 Jul 2023 05:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690805705; cv=none; d=google.com; s=arc-20160816; b=yKAA2uiGVJsaI3O6sVijO+bFF/iNYkiQI2NxBjpwOcwgVvYE2/vnE36pvQOtOl7EjS jyOwLmpOGcc8ZNhVA6CXopMjHdSV7dA8Pd3l0vRpunGy87w3UvdelWkA7+vZxb/lmqSL qe5zEMUFsXGetsuw/3mBXquz05FqbQwtcqR9e0646rLAayOIdJr7sM2GUk1+6IBesYbL mr5yFEYZ/dpFCVAMRDhoEZ0TOG175RT/sMOQ6rsobd12TkAp2twrSHJgcbRkUhX0LFnu pBluX83xMoooufx9mPUxvRqoWaUeUE2P5LIngT2NeUPBJm9nNNgw2jpbEjj84pCsMdNt 7lJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=68EI/p2JXAvYKOow4DOxTaMrbu3hsZhAN10WLu9ACbc=; fh=Qv5hPqadHX34I6jmINVWg1spmBJKMeato09X6JJ3U2Q=; b=sm52rtq7ezFopgXvTXHiQDnGEFlEZ9VAgThx2xWHX8KTCf3VDUM82FziLNJa5vTPH9 4hPwJV9YGGkOuY1dkKPrZogsWsLd30fWR0VrFpBblPtoKY8e9twaY/vfdqhOsHWH0KsM gM2+E6C2EN80qQvbrPtVk1VtTZB6yNVgh5+3qrFE9JdyVc38g/A/WZOXclEdPQpdouFm 53aSax/M5tnoIWbtIFm6yf/YqgD+RzFvuHn/EyDU+fV9q455PT14ZoMRjGUYgjoThkDP tFPjqSVbh0XqDwGFlAmQBuy9YfQ2mV1vnyf40yA3CsuWenlFuZKqo3bbiVZmYXWXOtBR LB3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=wX0NIVvF; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020aa7cf14000000b0051e0f0b46d9si6510618edy.688.2023.07.31.05.14.28; Mon, 31 Jul 2023 05:15:05 -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=@xen0n.name header.s=mail header.b=wX0NIVvF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbjGaKvN (ORCPT + 99 others); Mon, 31 Jul 2023 06:51:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231807AbjGaKut (ORCPT ); Mon, 31 Jul 2023 06:50:49 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D45D01BDB; Mon, 31 Jul 2023 03:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1690800563; bh=fZV1fPQDaoUXxVRY9TfX1xjDSukj+7ktchYSGtV8aSE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wX0NIVvFJefytOowE9WrM4HpblaYyO+f40zMQV+9se7Rny8ZAaTnQKbuxgBs8aYbK zqIbGyWU/5gZh1FE5Yu+6+JUKDZlHHMimTi+9JgpF+MKPPq7x97bP+bGzLW3UEpfYc o15PXdUIiIuUfhdyvc5znN1GekOQQtdy8F99Ruho= Received: from ld50.lan (unknown [101.88.28.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id B296F60555; Mon, 31 Jul 2023 18:49:23 +0800 (CST) From: WANG Xuerui To: Song Liu Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, WANG Xuerui Subject: [PATCH 5/5] raid6: test: only check for Altivec if building on powerpc hosts Date: Mon, 31 Jul 2023 18:49:11 +0800 Message-Id: <20230731104911.411964-6-kernel@xen0n.name> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230731104911.411964-1-kernel@xen0n.name> References: <20230731104911.411964-1-kernel@xen0n.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: WANG Xuerui Altivec is only available for powerpc hosts, so only check for its availability when the host is powerpc, to avoid error messages being shown on architectures other than x86, arm or powerpc. Signed-off-by: WANG Xuerui --- lib/raid6/test/Makefile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile index 143cda60faa12..1f693ea3b980c 100644 --- a/lib/raid6/test/Makefile +++ b/lib/raid6/test/Makefile @@ -35,6 +35,12 @@ ifeq ($(ARCH),aarch64) HAS_NEON = yes endif +ifeq ($(findstring ppc,$(ARCH)),ppc) + CFLAGS += -I../../../arch/powerpc/include + HAS_ALTIVEC := $(shell printf '$(pound)include \nvector int a;\n' |\ + gcc -c -x c - >/dev/null && rm ./-.o && echo yes) +endif + ifeq ($(IS_X86),yes) OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o avx512.o recov_avx512.o CFLAGS += -DCONFIG_X86 @@ -44,15 +50,10 @@ ifeq ($(IS_X86),yes) else ifeq ($(HAS_NEON),yes) OBJS += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o CFLAGS += -DCONFIG_KERNEL_MODE_NEON=1 -else - HAS_ALTIVEC := $(shell printf '$(pound)include \nvector int a;\n' |\ - gcc -c -x c - >/dev/null && rm ./-.o && echo yes) - ifeq ($(HAS_ALTIVEC),yes) - CFLAGS += -I../../../arch/powerpc/include - CFLAGS += -DCONFIG_ALTIVEC - OBJS += altivec1.o altivec2.o altivec4.o altivec8.o \ - vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o - endif +else ifeq ($(HAS_ALTIVEC),yes) + CFLAGS += -DCONFIG_ALTIVEC + OBJS += altivec1.o altivec2.o altivec4.o altivec8.o \ + vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o endif .c.o: -- 2.40.0