]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/mm: fix powerpc ARCH check
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 May 2024 11:58:25 +0000 (21:58 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:02:35 +0000 (12:02 +0200)
commit73b58d9d0c8ddb1f2959835bc672854d45220fbd
treedb16cec83bd8175242c05d0284849348d7727eaf
parent513f8dc02eec1470dbb620e5cc0de8345f88d080
selftests/mm: fix powerpc ARCH check

commit 7e6423441b36e3a03907e2df84b73c414c9c3763 upstream.

In commit 0518dbe97fe6 ("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: 0518dbe97fe6 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/mm/Makefile