summaryrefslogtreecommitdiff
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorMike Rapoport <rppt@kernel.org>2022-03-25 04:09:46 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-25 05:06:45 +0300
commit6f6a841fb77df0bc6383133b22feb9b015380a55 (patch)
tree18c6962013a643cf59dbdffffdaf48abaac15926 /mm/filemap.c
parent90647d9d725068ad27d39f80d2b4a5150d041038 (diff)
downloadlinux-6f6a841fb77df0bc6383133b22feb9b015380a55.tar.xz
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 'mm/filemap.c')
0 files changed, 0 insertions, 0 deletions