Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "vtop" command to display the swapinfo for arm64 kernel 5.19.0+
arm64/pgtable: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE Let's use one of the type bits: core-mm only supports 5, so there is no need to consume 6. Note that we might be able to reuse bit 1, but reusing bit 1 turned out problematic in the past for PROT_NONE handling; so let's play safe and use another bit. Link: https://lkml.kernel.org/r/20220329164329.208407-5-david@redhat.com Before: crash> vtop 70504000 VIRTUAL PHYSICAL 70504000 (not mapped) PAGE DIRECTORY: ffffff80f265c000 PGD: ffffff80f265c008 => 800000141537003 PMD: ffffff8101537c10 => 800000141538003 PTE: ffffff8101538820 => 12bc3e04 PTE vtop: cannot determine swap location After: crash> vtop 70504000 VIRTUAL PHYSICAL 70504000 (not mapped) PAGE DIRECTORY: ffffff80f265c000 PGD: ffffff80f265c008 => 800000141537003 PMD: ffffff8101537c10 => 800000141538003 PTE: ffffff8101538820 => 12bc3e04 PTE SWAP OFFSET 12bc3e04 /first_stage_ramdisk/dev/block/zram0 1227838 VMA START END FLAGS FILE ffffff80dfe7b578 70504000 707bd000 100073 SWAP: /first_stage_ramdisk/dev/block/zram0 OFFSET: 1227838 Signed-off-by: chenguanyou <chenguanyou@xiaomi.com>
- Loading branch information