summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2020-09-19 07:20:28 +0300
committerSasha Levin <sashal@kernel.org>2024-03-15 17:48:18 +0300
commit71317d703c550c819b5465c3a49ce98650089865 (patch)
tree7de41c2f8a0e8de16a30ec16076ca4421e600466 /tools
parentc96f49d3a741f6693feecdb067c442b609903d03 (diff)
downloadlinux-71317d703c550c819b5465c3a49ce98650089865.tar.xz
selftests/vm: fix display of page size in map_hugetlb
[ Upstream commit 1ec882fc81e3177faf055877310dbdb0c68eb7db ] The displayed size is in bytes while the text says it is in kB. Shift it by 10 to really display kBytes. Fixes: fa7b9a805c79 ("tools/selftest/vm: allow choosing mem size and page size in map_hugetlb") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: <stable@vger.kernel.org> Link: https://lkml.kernel.org/r/e27481224564a93d14106e750de31189deaa8bc8.1598861977.git.christophe.leroy@csgroup.eu Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/vm/map_hugetlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/vm/map_hugetlb.c b/tools/testing/selftests/vm/map_hugetlb.c
index ab349c6db00d..7b41cc6ecb0b 100644
--- a/tools/testing/selftests/vm/map_hugetlb.c
+++ b/tools/testing/selftests/vm/map_hugetlb.c
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
}
if (shift)
- printf("%u kB hugepages\n", 1 << shift);
+ printf("%u kB hugepages\n", 1 << (shift - 10));
else
printf("Default size hugepages\n");
printf("Mapping %lu Mbytes\n", (unsigned long)length >> 20);