mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
selftests/mm: skip test for non-LPA2 and non-LVA systems
Post my improvement of the test ine4a4ba4154("selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2 testing"): The test begins to fail on 4k and 16k pages, on non-LPA2 systems. To reduce noise in the CI systems, let us skip the test when higher address space is not implemented. Link: https://lkml.kernel.org/r/20240718052504.356517-1-dev.jain@arm.com Fixes:e4a4ba4154("selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2 testing") Signed-off-by: Dev Jain <dev.jain@arm.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
66eca1021a
commit
f556acc2fa
|
|
@ -293,6 +293,20 @@ static int run_test(struct testcase *test, int count)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __aarch64__
|
||||||
|
/* Check if userspace VA > 48 bits */
|
||||||
|
static int high_address_present(void)
|
||||||
|
{
|
||||||
|
void *ptr = mmap((void *)(1UL << 50), 1, PROT_READ | PROT_WRITE,
|
||||||
|
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
|
||||||
|
if (ptr == MAP_FAILED)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
munmap(ptr, 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int supported_arch(void)
|
static int supported_arch(void)
|
||||||
{
|
{
|
||||||
#if defined(__powerpc64__)
|
#if defined(__powerpc64__)
|
||||||
|
|
@ -300,7 +314,7 @@ static int supported_arch(void)
|
||||||
#elif defined(__x86_64__)
|
#elif defined(__x86_64__)
|
||||||
return 1;
|
return 1;
|
||||||
#elif defined(__aarch64__)
|
#elif defined(__aarch64__)
|
||||||
return 1;
|
return high_address_present();
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user