selftests/mm: va_high_addr_switch should skip unsupported arm64 configs
authorRyan Roberts <ryan.roberts@arm.com>
Mon, 24 Jul 2023 08:25:19 +0000 (09:25 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 18 Aug 2023 17:12:43 +0000 (10:12 -0700)
va_high_addr_switch has a mechanism to determine if the tests should be
run or skipped (supported_arch()).  This currently returns unconditionally
true for arm64.  However, va_high_addr_switch also requires a large
virtual address space for the tests to run, otherwise they spuriously
fail.

Since arm64 can only support VA > 48 bits when the page size is 64K, let's
decide whether we should skip the test suite based on the page size.  This
reduces noise when running on 4K and 16K kernels.

Link: https://lkml.kernel.org/r/20230724082522.1202616-6-ryan.roberts@arm.com
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Florent Revest <revest@chromium.org>
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/va_high_addr_switch.c

index 7cfaf4a74c571bb33c26dba370020a304b900c81..cfbc501290d3b64c9e648a0981ab774cda398003 100644 (file)
@@ -292,7 +292,7 @@ static int supported_arch(void)
 #elif defined(__x86_64__)
        return 1;
 #elif defined(__aarch64__)
-       return 1;
+       return getpagesize() == PAGE_SIZE;
 #else
        return 0;
 #endif