Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 7e64234

Browse files
mpeakpm00
authored andcommitted
selftests/mm: fix powerpc ARCH check
In commit 0518dbe ("selftests/mm: fix cross compilation with LLVM") the logic to detect the machine architecture in the Makefile was changed to use ARCH, and only fallback to uname -m if ARCH is unset. However the tests of ARCH were not updated to account for the fact that ARCH is "powerpc" for powerpc builds, not "ppc64". Fix it by changing the checks to look for "powerpc", and change the uname -m logic to convert "ppc64.*" into "powerpc". With that fixed the following tests now build for powerpc again: * protection_keys * va_high_addr_switch * virtual_address_range * write_to_hugetlbfs Link: https://lkml.kernel.org/r/20240506115825.66415-1-mpe@ellerman.id.au Fixes: 0518dbe ("selftests/mm: fix cross compilation with LLVM") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Cc: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org> [6.4+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 5f8be0e commit 7e64234

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/mm/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ uname_M := $(shell uname -m 2>/dev/null || echo not)
1212
else
1313
uname_M := $(shell echo $(CROSS_COMPILE) | grep -o '^[a-z0-9]\+')
1414
endif
15-
ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/ppc64/')
15+
ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/powerpc/')
1616
endif
1717

1818
# Without this, failed build products remain, with up-to-date timestamps,
@@ -98,13 +98,13 @@ TEST_GEN_FILES += $(BINARIES_64)
9898
endif
9999
else
100100

101-
ifneq (,$(findstring $(ARCH),ppc64))
101+
ifneq (,$(findstring $(ARCH),powerpc))
102102
TEST_GEN_FILES += protection_keys
103103
endif
104104

105105
endif
106106

107-
ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sparc64 x86_64))
107+
ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 powerpc riscv64 s390x sparc64 x86_64))
108108
TEST_GEN_FILES += va_high_addr_switch
109109
TEST_GEN_FILES += virtual_address_range
110110
TEST_GEN_FILES += write_to_hugetlbfs

0 commit comments

Comments
 (0)