diff options
| author | Mike Rapoport <[email protected]> | 2022-03-24 18:09:46 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2022-03-24 19:06:45 -0700 |
| commit | 6f6a841fb77df0bc6383133b22feb9b015380a55 (patch) | |
| tree | 18c6962013a643cf59dbdffffdaf48abaac15926 /tools/perf/scripts/python/netdev-times.py | |
| 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/[email protected]
Signed-off-by: Mike Rapoport <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions