From nobody Sun Feb 8 12:31:53 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 354A6C001E0 for ; Mon, 31 Jul 2023 10:50:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232052AbjGaKuQ (ORCPT ); Mon, 31 Jul 2023 06:50:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231685AbjGaKtp (ORCPT ); Mon, 31 Jul 2023 06:49:45 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C207F1FCD; Mon, 31 Jul 2023 03:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1690800559; bh=3+BgMlB03WtnMLfki2nDy1etZeSatZZUYt6mWNVYlCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gC+VPfdJR+ufKkXjg9/PMhOWEvELvTAgt7t8g+A2vsAdWeWVzlSsKnhgWay+6qmEi On6Drif3RAfaTYZ26j7Fjux4zbratEliiPJXbMIeM+Vw0+2qtKLXuCMvVUU71I4pjl 853sXnp44KPFEPg2myqZTIsAxYScwsOk1KJgLLA8= 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 72DBF6017D; Mon, 31 Jul 2023 18:49:19 +0800 (CST) From: WANG Xuerui To: Song Liu Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, WANG Xuerui Subject: [PATCH 1/5] raid6: remove the include from recov.c Date: Mon, 31 Jul 2023 18:49:07 +0800 Message-Id: <20230731104911.411964-2-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: WANG Xuerui There is no exported symbol left in recov.c, so the include is now unnecessary, and breaks the raid6test build. Remove it. Signed-off-by: WANG Xuerui --- lib/raid6/recov.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/raid6/recov.c b/lib/raid6/recov.c index e49d519de6cbe..a7c1b2bbe40d8 100644 --- a/lib/raid6/recov.c +++ b/lib/raid6/recov.c @@ -13,7 +13,6 @@ * the syndrome.) */ =20 -#include #include =20 /* Recover two failed data blocks. */ --=20 2.40.0 From nobody Sun Feb 8 12:31:53 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B729C001DF for ; Mon, 31 Jul 2023 10:50:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbjGaKuJ (ORCPT ); Mon, 31 Jul 2023 06:50:09 -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 S231582AbjGaKto (ORCPT ); Mon, 31 Jul 2023 06:49:44 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7114C1FD0; Mon, 31 Jul 2023 03:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1690800560; bh=Vrcj0+W95eie0atm7f7h2d141pVyQYj9rZE2KYcFCZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CkjBneP7eskEHDv3Pg696FP1Dy8ttxrr7xM6KKCmz40bL4sW/8VCSDP+eJ3DyZNXq oj4vFIeohtyX7C2zPy6tCjPDUZfAKKlmW29q3O7huLckR38wUri1qYpUHTjPZW2yaG uMRbv/AAbAd28/jhu4HXSFyOFC30Yq/7HlVgG/Zs= 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 9DEF46018C; Mon, 31 Jul 2023 18:49:20 +0800 (CST) From: WANG Xuerui To: Song Liu Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, WANG Xuerui Subject: [PATCH 2/5] raid6: guard the tables.c include of with __KERNEL__ Date: Mon, 31 Jul 2023 18:49:08 +0800 Message-Id: <20230731104911.411964-3-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: WANG Xuerui The export directives for the tables are already emitted with __KERNEL__ guards, but the include is not, causing errors when building the raid6test program. Guard this include too to fix the raid6test build. Signed-off-by: WANG Xuerui --- lib/raid6/mktables.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/raid6/mktables.c b/lib/raid6/mktables.c index f02e10fa62381..3be03793237c2 100644 --- a/lib/raid6/mktables.c +++ b/lib/raid6/mktables.c @@ -56,7 +56,9 @@ int main(int argc, char *argv[]) uint8_t v; uint8_t exptbl[256], invtbl[256]; =20 + printf("#ifdef __KERNEL__\n"); printf("#include \n"); + printf("#endif\n"); printf("#include \n"); =20 /* Compute multiplication table */ --=20 2.40.0 From nobody Sun Feb 8 12:31:53 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18551C001DE for ; Mon, 31 Jul 2023 10:50:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231430AbjGaKug (ORCPT ); Mon, 31 Jul 2023 06:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbjGaKtw (ORCPT ); Mon, 31 Jul 2023 06:49:52 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4C3A10E0; Mon, 31 Jul 2023 03:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1690800562; bh=JGGtMrE57kUvgv6mo7tmcpGnIHxi87n9B+IU2cOpSMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IJxUcEUfQfpGEWROn7cdMw1hixU6L6YhjdHvvkDecF3rT8pSTQh5Tp0WTrjH/ydCS aESRGHF6y5yzexM6bTS/U2k6OEDZ+wS9uzLm9vMd6b4VirHzdPamgRZ+xLQy/aSLDr VNup9aq9QC0plDwmOo2wXbgbfTwRWZcOo1TfdsrA= 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 17D3B6019D; Mon, 31 Jul 2023 18:49:22 +0800 (CST) From: WANG Xuerui To: Song Liu Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, WANG Xuerui Subject: [PATCH 3/5] raid6: test: cosmetic cleanups for the test Makefile Date: Mon, 31 Jul 2023 18:49:09 +0800 Message-Id: <20230731104911.411964-4-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: WANG Xuerui Use tabs/spaces consistently: hard tabs for marking recipe lines only, spaces for everything else. Also, the OPTFLAGS declaration actually included the tabs preceding the line comment, making compiler invocation lines unnecessarily long. As the entire block of declarations are meant for ad-hoc customization (otherwise they would probably make use of `?=3D` instead of `=3D`), move the "Adjust as desired" comment above the block too to fix the long invocation lines. Signed-off-by: WANG Xuerui --- lib/raid6/test/Makefile | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile index 4fb7700a741bd..143cda60faa12 100644 --- a/lib/raid6/test/Makefile +++ b/lib/raid6/test/Makefile @@ -6,14 +6,15 @@ =20 pound :=3D \# =20 -CC =3D gcc -OPTFLAGS =3D -O2 # Adjust as desired -CFLAGS =3D -I.. -I ../../../include -g $(OPTFLAGS) -LD =3D ld -AWK =3D awk -f -AR =3D ar -RANLIB =3D ranlib -OBJS =3D int1.o int2.o int4.o int8.o int16.o int32.o recov.o algos.o tabl= es.o +# Adjust as desired +CC =3D gcc +OPTFLAGS =3D -O2 +CFLAGS =3D -I.. -I ../../../include -g $(OPTFLAGS) +LD =3D ld +AWK =3D awk -f +AR =3D ar +RANLIB =3D ranlib +OBJS =3D int1.o int2.o int4.o int8.o int16.o int32.o recov.o algos.o t= ables.o =20 ARCH :=3D $(shell uname -m 2>/dev/null | sed -e /s/i.86/i386/) ifeq ($(ARCH),i386) @@ -37,9 +38,9 @@ endif ifeq ($(IS_X86),yes) OBJS +=3D mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o = avx512.o recov_avx512.o CFLAGS +=3D -DCONFIG_X86 - CFLAGS +=3D $(shell echo "vpmovm2b %k1, %zmm5" | \ - gcc -c -x assembler - >/dev/null 2>&1 && \ - rm ./-.o && echo -DCONFIG_AS_AVX512=3D1) + CFLAGS +=3D $(shell echo "vpmovm2b %k1, %zmm5" | \ + gcc -c -x assembler - >/dev/null 2>&1 && \ + rm ./-.o && echo -DCONFIG_AS_AVX512=3D1) else ifeq ($(HAS_NEON),yes) OBJS +=3D neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o re= cov_neon_inner.o CFLAGS +=3D -DCONFIG_KERNEL_MODE_NEON=3D1 @@ -63,12 +64,12 @@ endif %.uc: ../%.uc cp -f $< $@ =20 -all: raid6.a raid6test +all: raid6.a raid6test =20 raid6.a: $(OBJS) - rm -f $@ - $(AR) cq $@ $^ - $(RANLIB) $@ + rm -f $@ + $(AR) cq $@ $^ + $(RANLIB) $@ =20 raid6test: test.c raid6.a $(CC) $(CFLAGS) -o raid6test $^ --=20 2.40.0 From nobody Sun Feb 8 12:31:53 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44B2EC001E0 for ; Mon, 31 Jul 2023 10:50:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230425AbjGaKu0 (ORCPT ); Mon, 31 Jul 2023 06:50:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbjGaKtu (ORCPT ); Mon, 31 Jul 2023 06:49:50 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C6C510DD; Mon, 31 Jul 2023 03:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1690800563; bh=ucpGdtrngWa5JzqKl0A4/BV0rC8meuk5XgXujtm+V8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K72qV7FrPVP002HDxADN7m/xyBPa1V4f9gZyPcfPBk1OnCB7hL5kdE8t3olGoZGib VsX0eibWzOKbfwNmaKq4s7AmwCFVwTkS+AJn/WCySwAzYVPxJEaiHhP+FPj4VVmYEt 7hBYlUGrlpSK3Dg6+kLuZ9mqxKuGS10rBFt/s0Bw= 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 EEFD0601DA; Mon, 31 Jul 2023 18:49:22 +0800 (CST) From: WANG Xuerui To: Song Liu Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, WANG Xuerui Subject: [PATCH 4/5] raid6: test: make sure all intermediate and artifact files are .gitignored Date: Mon, 31 Jul 2023 18:49:10 +0800 Message-Id: <20230731104911.411964-5-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: WANG Xuerui Currently when the raid6test utility is built, the resulting binary and an int.uc file are not being ignored, which can get inadvertently committed as a result when one works on the raid6 code. Ignore them to make `git status` clean at all times. Signed-off-by: WANG Xuerui --- lib/raid6/test/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 lib/raid6/test/.gitignore diff --git a/lib/raid6/test/.gitignore b/lib/raid6/test/.gitignore new file mode 100644 index 0000000000000..bb92e11396c6e --- /dev/null +++ b/lib/raid6/test/.gitignore @@ -0,0 +1,2 @@ +/int.uc +/raid6test --=20 2.40.0 From nobody Sun Feb 8 12:31:53 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6EB7C001DF for ; Mon, 31 Jul 2023 10:51:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232132AbjGaKvO (ORCPT ); Mon, 31 Jul 2023 06:51:14 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =3D yes endif =20 +ifeq ($(findstring ppc,$(ARCH)),ppc) + CFLAGS +=3D -I../../../arch/powerpc/include + HAS_ALTIVEC :=3D $(shell printf '$(pound)include \nvect= or int a;\n' |\ + gcc -c -x c - >/dev/null && rm ./-.o && echo yes) +endif + ifeq ($(IS_X86),yes) OBJS +=3D mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o = avx512.o recov_avx512.o CFLAGS +=3D -DCONFIG_X86 @@ -44,15 +50,10 @@ ifeq ($(IS_X86),yes) else ifeq ($(HAS_NEON),yes) OBJS +=3D neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o re= cov_neon_inner.o CFLAGS +=3D -DCONFIG_KERNEL_MODE_NEON=3D1 -else - HAS_ALTIVEC :=3D $(shell printf '$(pound)include \nvect= or int a;\n' |\ - gcc -c -x c - >/dev/null && rm ./-.o && echo yes) - ifeq ($(HAS_ALTIVEC),yes) - CFLAGS +=3D -I../../../arch/powerpc/include - CFLAGS +=3D -DCONFIG_ALTIVEC - OBJS +=3D altivec1.o altivec2.o altivec4.o altivec8.o \ - vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o - endif +else ifeq ($(HAS_ALTIVEC),yes) + CFLAGS +=3D -DCONFIG_ALTIVEC + OBJS +=3D altivec1.o altivec2.o altivec4.o altivec8.o \ + vpermxor1.o vpermxor2.o vpermxor4.o vpermxor8.o endif =20 .c.o: --=20 2.40.0