summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaitanya S Prakash <chaitanyas.prakash@arm.com>2023-03-23 13:52:41 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-04-19 02:53:51 +0300
commitc2af2a41905efcf662b53f280f8538e5c6bd05f4 (patch)
tree0ef8373607dc6fa1cb5242d094c88427b7395d34
parentbbe168729d4ef8305f4e35c3bbe4711389ab8354 (diff)
downloadlinux-c2af2a41905efcf662b53f280f8538e5c6bd05f4.tar.xz
selftests/mm: add platform independent in code comments
The in code comments for the selftest were made on the basis of 128TB switch, an architecture feature specific to PowerPc and x86 platforms. Keeping in mind the support added for arm64 platforms which implements a 256TB switch, a more generic explanation has been provided. Link: https://lkml.kernel.org/r/20230323105243.2807166-4-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash <chaitanyas.prakash@arm.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--tools/testing/selftests/mm/va_high_addr_switch.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/testing/selftests/mm/va_high_addr_switch.c b/tools/testing/selftests/mm/va_high_addr_switch.c
index 6679213effed..7cfaf4a74c57 100644
--- a/tools/testing/selftests/mm/va_high_addr_switch.c
+++ b/tools/testing/selftests/mm/va_high_addr_switch.c
@@ -30,8 +30,8 @@
#endif
/*
- * >= 128TB is the hint addr value we used to select
- * large address space.
+ * The hint addr value is used to allocate addresses
+ * beyond the high address switch boundary.
*/
#define ADDR_MARK_128TB (1UL << 47)
@@ -73,9 +73,10 @@ static struct testcase testcases[] = {
},
{
/*
- * We should never allocate at the requested address or above it
- * The len cross the 128TB boundary. Without MAP_FIXED
- * we will always search in the lower address space.
+ * Unless MAP_FIXED is specified, allocation based on hint
+ * addr is never at requested address or above it, which is
+ * beyond high address switch boundary in this case. Instead,
+ * a suitable allocation is found in lower address space.
*/
.addr = ((void *)(ADDR_SWITCH_HINT - PAGE_SIZE)),
.size = 2 * PAGE_SIZE,
@@ -85,8 +86,8 @@ static struct testcase testcases[] = {
},
{
/*
- * Exact mapping at 128TB, the area is free we should get that
- * even without MAP_FIXED.
+ * Exact mapping at high address switch boundary, should
+ * be obtained even without MAP_FIXED as area is free.
*/
.addr = ((void *)(ADDR_SWITCH_HINT)),
.size = PAGE_SIZE,