WSL2-Linux-Kernel/tools
Mike Rapoport 6f6a841fb7 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>
2022-03-24 19:06:45 -07:00
..
accounting
arch ARM: 2022-03-24 11:58:57 -07:00
bootconfig
bpf
build
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv
iio
include Merge branch 'akpm' (patches from Andrew) 2022-03-24 14:14:07 -07:00
io_uring
kvm/kvm_stat
laptop
leds
lib Networking changes for 5.18. 2022-03-24 13:13:26 -07:00
memory-model
objtool
pci
pcmcia
perf Networking changes for 5.18. 2022-03-24 13:13:26 -07:00
power
rcu
scripts
spi
testing selftest/vm: add helpers to detect PAGE_SIZE and PAGE_SHIFT 2022-03-24 19:06:45 -07:00
thermal/tmon
time
tracing
usb
virtio
vm tools/vm/page_owner_sort.c: support for user-defined culling rules 2022-03-24 19:06:45 -07:00
wmi
Makefile