From nobody Mon Feb 9 08:48:54 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 320991DDC3E; Sat, 1 Mar 2025 11:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740828259; cv=none; b=Eh5/lb1evBVQll8uX27+pTmp8r/K0uWv+8OjktzpVXt/ijcIYgM01bv3xkk/1C+FyGt9T6utW6Gl91zdRbbOPRhlXEKYU9bxsAvmpZBKg9jS3stUiI5dJ8Z4dULTswW/mIf/VVooDiSS6hTR46Pt44rVrqw8GdDIgnCBBZVMvY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740828259; c=relaxed/simple; bh=1JuS5zkZ2El7ErBN7hZsJKO4f4t9cEl5hlFQ3JjXUfo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=stCLPbr0UTre9X0NWo9YTzjj1JzKSAoakWq79pWw1O2M8DE6aC5DDDTc52MvyIGgylgEOkqGwJnefyzYSri/cE04bglZtRIF4uDOUApGN00eWx7WensdVbaQroORwImpe/y4bk1HLVkGWw8k1RDkTucL3D05Sqa0I7SBT+051nE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=mc4sZAQX; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="mc4sZAQX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1740828247; bh=1JuS5zkZ2El7ErBN7hZsJKO4f4t9cEl5hlFQ3JjXUfo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=mc4sZAQXIA4U2GXk9OEVTlpyWCGVJPvRhAbD9LTFFZh+ADsL2agkshTwuXQ3mzH6V Cd8ZJ/pzdSse6mCQ4bnOJC4B743xgb9KMWb492k4Emda+UYRwpjBrGtkCxbBwm55EP yJs4HdtiI29CwAMSSbfLjdEMvJNVYmCMpetXZOlM= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 01 Mar 2025 12:23:59 +0100 Subject: [PATCH 1/2] selftests/nolibc: explicitly enable ARM mode Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250301-nolibc-armthumb-v1-1-d1f04abb5f6d@weissschuh.net> References: <20250301-nolibc-armthumb-v1-0-d1f04abb5f6d@weissschuh.net> In-Reply-To: <20250301-nolibc-armthumb-v1-0-d1f04abb5f6d@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1740828247; l=860; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=1JuS5zkZ2El7ErBN7hZsJKO4f4t9cEl5hlFQ3JjXUfo=; b=B3ePB1i1gCN3841r+x+kY6ts/pt6RaCN9CsT5lWnJRXD8KsjYdK6Nc1kbH2XUKVfJLWSKIE0t ZM6fvhFhTn1DmPCSUkkeblSRi7Xtd4NdS+mayDRL2V60CdCdKOVgcDi X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The default could also be -mthumb. Explicitly use -marm to keep everything predictable. Signed-off-by: Thomas Wei=C3=9Fschuh Tested-by: Willy Tarreau --- tools/testing/selftests/nolibc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile index 14fc8c7e7c3067efddf0f729890fb78df731efb3..1dd2841a5fe781254a7f4b7b1ad= e677bd4bc0691 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -160,6 +160,7 @@ Q=3D@ endif =20 CFLAGS_i386 =3D $(call cc-option,-m32) +CFLAGS_arm =3D -marm CFLAGS_ppc =3D -m32 -mbig-endian -mno-vsx $(call cc-option,-mmultiple) CFLAGS_ppc64 =3D -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple) CFLAGS_ppc64le =3D -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=3D= elfv2) --=20 2.48.1 From nobody Mon Feb 9 08:48:54 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3203E1DA614; Sat, 1 Mar 2025 11:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740828260; cv=none; b=RhscUuvo15yuEOw3KcxcsFM7S+qpBbF0vwO9LPsG8pZOo9ciYsLHvYhFY28TxwlR4RkowdyXelb9gbJ2YEsNXEPKnZ5LxJXcgLHQvIyrILN017b81r84piDovlv43zxw9ncyj2ium/fRYRUXC5wgjC7nrmXGRDmLjN/sHNudHpI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740828260; c=relaxed/simple; bh=N7ZWUnKVuIBNSW6j79uZezmUkip3hXepNP58JvVypS0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fNXsqfK9u8I27dpqkZ2MZigSVnPTeIHdWksr0ZUeF39NXgCPFFUw5DEAOxcQ8+4gPRXIZq+fZQLwL67f9YNmzv5olyiwRnm17lH6liaWGfhpd9gJMVY6exEzSWmi9I0I4rEi0jRhfy6mtdutFt+IlrNO8HFuzAOJQyeUKv3Z/tA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=ifQAO72m; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="ifQAO72m" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1740828247; bh=N7ZWUnKVuIBNSW6j79uZezmUkip3hXepNP58JvVypS0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ifQAO72m5tvA5EjMYl2I4UDlty1hx9BfiiRgItWQH3ISevpMsHar4Gf3IFSYZFekd XufsqsWOvA6sP3M5X8lNtEvOFhY7+Rqz58WDKxDWNYwZQDlATYRksRYCIPBdUSDKPU 21v/luRiC6y76ItgQ5WWhz0e0/Kk5QGHsabwpurs= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sat, 01 Mar 2025 12:24:00 +0100 Subject: [PATCH 2/2] selftests/nolibc: add armthumb configuration Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250301-nolibc-armthumb-v1-2-d1f04abb5f6d@weissschuh.net> References: <20250301-nolibc-armthumb-v1-0-d1f04abb5f6d@weissschuh.net> In-Reply-To: <20250301-nolibc-armthumb-v1-0-d1f04abb5f6d@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1740828247; l=3801; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=N7ZWUnKVuIBNSW6j79uZezmUkip3hXepNP58JvVypS0=; b=PS9zm1uV+QWq2zw/BHUdLsH0c6niEyt3zZEsDQe1oczKVy7HqYIeBFMVp/lvlctXVKknASmbN 7aEcnDoTBVEBN5WAp4104H2iP4aBmXhL8IKZ21q8WyOnoWnkmHwU+aw X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= While nolibc does support ARM Thumb instructions, that support was not tested specifically. Add a new test configuration for it. Signed-off-by: Thomas Wei=C3=9Fschuh Tested-by: Willy Tarreau --- tools/testing/selftests/nolibc/Makefile | 6 ++++++ tools/testing/selftests/nolibc/run-tests.sh | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile index 1dd2841a5fe781254a7f4b7b1ade677bd4bc0691..58bcbbd029bc3ad9ccac968191b= 703ccf5df0717 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -47,6 +47,7 @@ XARCH_riscv =3D riscv64 XARCH =3D $(or $(XARCH_$(ARCH)),$(ARCH)) =20 # map from user input variants to their kernel supported architectures +ARCH_armthumb =3D arm ARCH_ppc =3D powerpc ARCH_ppc64 =3D powerpc ARCH_ppc64le =3D powerpc @@ -63,6 +64,7 @@ IMAGE_x86_64 =3D arch/x86/boot/bzImage IMAGE_x86 =3D arch/x86/boot/bzImage IMAGE_arm64 =3D arch/arm64/boot/Image IMAGE_arm =3D arch/arm/boot/zImage +IMAGE_armthumb =3D arch/arm/boot/zImage IMAGE_mips32le =3D vmlinuz IMAGE_mips32be =3D vmlinuz IMAGE_ppc =3D vmlinux @@ -83,6 +85,7 @@ DEFCONFIG_x86_64 =3D defconfig DEFCONFIG_x86 =3D defconfig DEFCONFIG_arm64 =3D defconfig DEFCONFIG_arm =3D multi_v7_defconfig +DEFCONFIG_armthumb =3D multi_v7_defconfig DEFCONFIG_mips32le =3D malta_defconfig DEFCONFIG_mips32be =3D malta_defconfig generic/eb.config DEFCONFIG_ppc =3D pmac32_defconfig @@ -107,6 +110,7 @@ QEMU_ARCH_x86_64 =3D x86_64 QEMU_ARCH_x86 =3D x86_64 QEMU_ARCH_arm64 =3D aarch64 QEMU_ARCH_arm =3D arm +QEMU_ARCH_armthumb =3D arm QEMU_ARCH_mips32le =3D mipsel # works with malta_defconfig QEMU_ARCH_mips32be =3D mips QEMU_ARCH_ppc =3D ppc @@ -136,6 +140,7 @@ QEMU_ARGS_x86_64 =3D -M pc -append "console=3DttyS0= ,9600 i8042.noaux panic=3D-1 $( QEMU_ARGS_x86 =3D -M pc -append "console=3DttyS0,9600 i8042.noaux p= anic=3D-1 $(TEST:%=3DNOLIBC_TEST=3D%)" QEMU_ARGS_arm64 =3D -M virt -cpu cortex-a53 -append "panic=3D-1 $(TES= T:%=3DNOLIBC_TEST=3D%)" QEMU_ARGS_arm =3D -M virt -append "panic=3D-1 $(TEST:%=3DNOLIBC_TES= T=3D%)" +QEMU_ARGS_armthumb =3D -M virt -append "panic=3D-1 $(TEST:%=3DNOLIBC_TES= T=3D%)" QEMU_ARGS_mips32le =3D -M malta -append "panic=3D-1 $(TEST:%=3DNOLIBC_TE= ST=3D%)" QEMU_ARGS_mips32be =3D -M malta -append "panic=3D-1 $(TEST:%=3DNOLIBC_TE= ST=3D%)" QEMU_ARGS_ppc =3D -M g3beige -append "console=3DttyS0 panic=3D-1 $(= TEST:%=3DNOLIBC_TEST=3D%)" @@ -161,6 +166,7 @@ endif =20 CFLAGS_i386 =3D $(call cc-option,-m32) CFLAGS_arm =3D -marm +CFLAGS_armthumb =3D -mthumb -march=3Darmv6t2 CFLAGS_ppc =3D -m32 -mbig-endian -mno-vsx $(call cc-option,-mmultiple) CFLAGS_ppc64 =3D -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple) CFLAGS_ppc64le =3D -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=3D= elfv2) diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/se= lftests/nolibc/run-tests.sh index d716124f5e82b74deb48c9c2c3c699e4c076418c..0299a0912d4049dd12217f9835b= 81d231e1d2bfd 100755 --- a/tools/testing/selftests/nolibc/run-tests.sh +++ b/tools/testing/selftests/nolibc/run-tests.sh @@ -19,7 +19,7 @@ werror=3D1 llvm=3D all_archs=3D( i386 x86_64 - arm64 arm + arm64 arm armthumb mips32le mips32be ppc ppc64 ppc64le riscv32 riscv64 @@ -103,6 +103,7 @@ fi crosstool_arch() { case "$1" in arm64) echo aarch64;; + armthumb) echo arm;; ppc) echo powerpc;; ppc64) echo powerpc64;; ppc64le) echo powerpc64;; @@ -116,7 +117,7 @@ crosstool_arch() { =20 crosstool_abi() { case "$1" in - arm) echo linux-gnueabi;; + arm | armthumb) echo linux-gnueabi;; *) echo linux;; esac } --=20 2.48.1