diff options
author | Mike Rapoport | 2022-03-24 18:09:46 -0700 |
---|---|---|
committer | Linus Torvalds | 2022-03-24 19:06:45 -0700 |
commit | 6f6a841fb77df0bc6383133b22feb9b015380a55 (patch) | |
tree | 18c6962013a643cf59dbdffffdaf48abaac15926 /lib/fonts | |
parent | 90647d9d725068ad27d39f80d2b4a5150d041038 (diff) |
selftest/vm: add helpers to detect PAGE_SIZE and PAGE_SHIFT
PAGE_SIZE is not 4096 in many configurations, particularly ppc64 uses 64K
pages in majority of cases.
Add helpers to detect PAGE_SIZE and PAGE_SHIFT dynamically.
Without this tests are broken w.r.t reading /proc/self/pagemap
if (pread(pagemap_fd, ent, sizeof(ent),
(uintptr_t)ptr >> (PAGE_SHIFT - 3)) != sizeof(ent))
err(2, "read pagemap");
Link: https://lkml.kernel.org/r/20220307054355.149820-2-aneesh.kumar@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/fonts')
0 files changed, 0 insertions, 0 deletions