s390/mm/ptdump: Improve sorting of markers
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 23 Jul 2024 18:49:55 +0000 (20:49 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 31 Jul 2024 14:30:20 +0000 (16:30 +0200)
commit7e12284c523be33f34d43b2bf8627ab0c8af2388
tree504cc1bd23ebef9c3ad684820a42cdebcc1d48b0
parent7e4d4cfed6483303436687f1db9a28a377c6ab2a
s390/mm/ptdump: Improve sorting of markers

Use the sort() from lib/sort.c to sort markers instead of the private
implementation. The current implementation does not sort markers
properly if they have to be moved downwards:

---[ Real Memory Copy Area Start ]---
0x0000035b903ff000-0x0000035b90400000         4K PTE I
---[ vmalloc Area Start ]---
---[ Real Memory Copy Area End ]---

Add a new member to each marker which indicates if a marker is start
of an area. If addresses of areas are equal consider an address which
defines the start of an area higher than the address which defines the
end of an area. In result the output is sorted as intended:

---[ Real Memory Copy Area Start ]---
0x0000019cedcff000-0x0000019cedd00000         4K PTE I
---[ Real Memory Copy Area End ]---
---[ vmalloc Area Start ]---

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/mm/dump_pagetables.c