Skip to content

Commit 3c0e9a2

Browse files
kylee0215akpm00
authored andcommitted
scripts/gdb: change the layout of vmemmap
We need to change the layout of vmemmap in gdb scripts after commit 32697ff ("arm64: vmemmap: Avoid base2 order of struct page size to dimension region") changed it. Link: https://lkml.kernel.org/r/[email protected] Fixes: 32697ff ("arm64: vmemmap: Avoid base2 order of struct page size to dimension region") Signed-off-by: Kuan-Ying Lee <[email protected]> Cc: Jan Kiszka <[email protected]> Cc: Kieran Bingham <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Michael Ellerman <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent f2eaed1 commit 3c0e9a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/gdb/linux/mm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ def __init__(self):
8989
self.MODULES_VADDR = self._PAGE_END(self.VA_BITS_MIN)
9090
self.MODULES_END = self.MODULES_VADDR + self.MODULES_VSIZE
9191

92-
self.VMEMMAP_SHIFT = (self.PAGE_SHIFT - self.STRUCT_PAGE_MAX_SHIFT)
93-
self.VMEMMAP_SIZE = ((self._PAGE_END(self.VA_BITS_MIN) - self.PAGE_OFFSET) >> self.VMEMMAP_SHIFT)
94-
self.VMEMMAP_START = (-(1 << (self.VA_BITS - self.VMEMMAP_SHIFT))) & 0xffffffffffffffff
95-
self.VMEMMAP_END = self.VMEMMAP_START + self.VMEMMAP_SIZE
92+
self.VMEMMAP_RANGE = self._PAGE_END(self.VA_BITS_MIN) - self.PAGE_OFFSET
93+
self.VMEMMAP_SIZE = (self.VMEMMAP_RANGE >> self.PAGE_SHIFT) * self.struct_page_size
94+
self.VMEMMAP_END = (-(1 * 1024 * 1024 * 1024)) & 0xffffffffffffffff
95+
self.VMEMMAP_START = self.VMEMMAP_END - self.VMEMMAP_SIZE
9696

9797
self.VMALLOC_START = self.MODULES_END
9898
self.VMALLOC_END = self.VMEMMAP_START - 256 * 1024 * 1024

0 commit comments

Comments
 (0)