On s390 the zEC12 machines support 2GB frames. In order to walk page tables correctly add support to the page table walker function so it detects 2GB frames. Signed-off-by: Heiko Carstens <heiko.carstens at de.ibm.com> Signed-off-by: Michael Holzheu <holzheu at linux.vnet.ibm.com> --- arch/s390x.c | 6 ++++++ makedumpfile.h | 1 + 2 files changed, 7 insertions(+) --- a/arch/s390x.c +++ b/arch/s390x.c @@ -247,6 +247,11 @@ vtop_s390x(unsigned long vaddr) return NOT_PADDR; } table = entry & _REGION_ENTRY_ORIGIN; + if ((entry & _REGION_ENTRY_LARGE) && (level == 1)) { + table &= ~0x7fffffffUL; + paddr = table + (vaddr & 0x7ffffffUL); + return paddr; + } len = RSG_TABLE_LENGTH(entry); level--; } @@ -257,6 +262,7 @@ vtop_s390x(unsigned long vaddr) * if no, then get the page table entry using PX index. */ if (entry & _SEGMENT_ENTRY_LARGE) { + table &= ~_PAGE_BYTE_INDEX_MASK; paddr = table + (vaddr & _PAGE_BYTE_INDEX_MASK); } else { entry = _kl_pg_table_deref_s390x(vaddr, --- a/makedumpfile.h +++ b/makedumpfile.h @@ -563,6 +563,7 @@ do { \ #define _REGION_ENTRY_TYPE_MASK 0x0c /* region table type mask */ #define _REGION_ENTRY_INVALID 0x20 /* invalid region table entry */ #define _REGION_ENTRY_LENGTH 0x03 /* region table length */ +#define _REGION_ENTRY_LARGE 0x400 #define _REGION_OFFSET_MASK 0x7ffUL /* region/segment table offset mask */ #define RSG_TABLE_LEVEL(x) (((x) & _REGION_ENTRY_TYPE_MASK) >> 2)