[PATCH] makedumpfile: s390x: Add 2GB frame support for page table walker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Atsushi,

On Mon, 22 Oct 2012 16:20:56 +0900
Atsushi Kumagai <kumagai-atsushi at mxc.nes.nec.co.jp> wrote:

> Hello Michael,
> 
> On Fri, 19 Oct 2012 18:29:12 +0200
> Michael Holzheu <holzheu at linux.vnet.ibm.com> wrote:

[snip]

> > --- 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);
>                                                  ^^^^^^^^^^^
> There is 0x7ffffff(27bit) but the patch for crash uses
> 0x7fffffff(31bit). Which is correct ?

You are right! This is a typo in the makedumpfile patch. It should
be 0x7fffffff (31 bit). Thanks for your careful review!

Here the corrected patch:
---
 arch/s390x.c   | 6 ++++++
 makedumpfile.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/arch/s390x.c b/arch/s390x.c
index 02b9e63..5854f10 100644
--- 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 & 0x7fffffffUL);
+			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,
diff --git a/makedumpfile.h b/makedumpfile.h
index 2b88fa4..62bc5cc 100644
--- 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)




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux