[Crash-utility] [PATCH] CONFIG_SPARSEMEM for s390(x)

Michael Holzheu holzheu at linux.vnet.ibm.com
Thu Sep 4 16:30:01 UTC 2008


Hi Dave,

Here the new patch.
Unfortunately kmem -n reports an error...

crash> kmem -n
NODE    SIZE      PGLIST_DATA       BOOTMEM_DATA       NODE_ZONES   
  0    131071        4c9100            90c158            4c9100     
                                                         4cd800
                                                         4d1f00
    MEM_MAP       START_PADDR  START_MAPNR
  3e040000000          0            0     

ZONE  NAME         SIZE       MEM_MAP      START_PADDR  START_MAPNR
  0   DMA        131071       3e040000000            0            0
  1   Normal          0                 0            0            0
  2   Movable         0                 0            0            0

-------------------------------------------------------------------

NR      SECTION        CODED_MEM_MAP        MEM_MAP       PFN
 0       a3a800          3e040000000       3e040000000
0               
 1       a3a810          3e040000000       3e040580000
65536           
kmem: read error: kernel virtual address: 0  type: "memory section"

---
diff -Naurp crash-4.0-7.1/defs.h crash-4.0-7.1-sparse-mem-s390/defs.h
--- crash-4.0-7.1/defs.h	2008-08-19 17:10:51.000000000 +0200
+++ crash-4.0-7.1-sparse-mem-s390/defs.h	2008-09-04 18:24:10.000000000 +0200
@@ -2636,6 +2636,9 @@ struct efi_memory_desc_t {
 
 #define TIF_SIGPENDING (2)
 
+#define _SECTION_SIZE_BITS	25
+#define _MAX_PHYSMEM_BITS	31
+
 #endif  /* S390 */
 
 #ifdef S390X
@@ -2658,6 +2661,9 @@ struct efi_memory_desc_t {
 
 #define TIF_SIGPENDING (2)
 
+#define _SECTION_SIZE_BITS	28
+#define _MAX_PHYSMEM_BITS	42
+
 #endif  /* S390X */
 
 #ifdef PLATFORM
diff -Naurp crash-4.0-7.1/s390.c crash-4.0-7.1-sparse-mem-s390/s390.c
--- crash-4.0-7.1/s390.c	2008-08-19 17:10:51.000000000 +0200
+++ crash-4.0-7.1-sparse-mem-s390/s390.c	2008-09-04 18:24:27.000000000 +0200
@@ -130,11 +130,14 @@ s390_init(int when)
 		machdep->dump_irq = s390_dump_irq;
 		if (!machdep->hz)
 			machdep->hz = HZ;
+		machdep->section_size_bits = _SECTION_SIZE_BITS;
+		machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
 		break;
 
 	case POST_INIT:
 		break;
 	}
+
 }
 
 /*
diff -Naurp crash-4.0-7.1/s390x.c crash-4.0-7.1-sparse-mem-s390/s390x.c
--- crash-4.0-7.1/s390x.c	2008-08-19 17:10:51.000000000 +0200
+++ crash-4.0-7.1-sparse-mem-s390/s390x.c	2008-09-04 18:24:24.000000000 +0200
@@ -128,6 +128,8 @@ s390x_init(int when)
 		machdep->dump_irq = s390x_dump_irq;
 		if (!machdep->hz)
 			machdep->hz = HZ;
+		machdep->section_size_bits = _SECTION_SIZE_BITS;
+		machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
 		break;
 
 	case POST_INIT:





More information about the Crash-utility mailing list