selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2...
authorDev Jain <dev.jain@arm.com>
Wed, 22 May 2024 07:04:35 +0000 (12:34 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 4 Jul 2024 02:29:57 +0000 (19:29 -0700)
commite4a4ba4154199ca9728c85589e2889389ef33c2a
treede3f202094f57703d5c05c13a40524fe56b6ae08
parent85e8bcb4190efb0b4443b637fd7a62ca2f05de6f
selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2 testing

Post FEAT_LPA2, the Aarch64 Linux kernel extends higher address support to
4K and 16K translation granules.  To support testing this out, we need to
do away with static initialization of page size, while still maintaining
the nice array of testcases; this can be achieved by initializing and
populating the array as a stack variable, and filling in the page size and
hugepage size at runtime.

Link: https://lkml.kernel.org/r/20240522070435.773918-3-dev.jain@arm.com
Signed-off-by: Dev Jain <dev.jain@arm.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.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