]> git.baikalelectronics.ru Git - kernel.git/commitdiff
parisc: Show DIMM slot number which holds broken memory module
authorHelge Deller <deller@gmx.de>
Tue, 25 Jul 2017 18:12:25 +0000 (20:12 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 25 Jul 2017 19:43:10 +0000 (21:43 +0200)
The Page Deallocation Table (PDT) holds the physical addresses of all broken
memory addresses. With the physical address we now are able to show which DIMM
slot (e.g. 1a, 3c) actually holds the broken memory module so that users are
able to replace it.

Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/pdt.c

index 040d49b723d78f785900f64b83eea78e4b65ac33..d02874ecb94df27d3171ae221ba693f4f8ca0a9c 100644 (file)
@@ -133,11 +133,20 @@ void __init pdc_pdt_init(void)
        }
 
        for (i = 0; i < pdt_status.pdt_entries; i++) {
-               if (i < 20)
-                       pr_warn("PDT: BAD PAGE #%d at 0x%08lx (error_type = %lu)\n",
-                               i,
-                               pdt_entry[i] & PAGE_MASK,
-                               pdt_entry[i] & 1);
+               struct pdc_pat_mem_phys_mem_location loc;
+
+               /* get DIMM slot number */
+               loc.dimm_slot = 0xff;
+#ifdef CONFIG_64BIT
+               pdc_pat_mem_get_dimm_phys_location(&loc, pdt_entry[i]);
+#endif
+
+               pr_warn("PDT: BAD PAGE #%d at 0x%08lx, "
+                       "DIMM slot %02x (error_type = %lu)\n",
+                       i,
+                       pdt_entry[i] & PAGE_MASK,
+                       loc.dimm_slot,
+                       pdt_entry[i] & 1);
 
                /* mark memory page bad */
                memblock_reserve(pdt_entry[i] & PAGE_MASK, PAGE_SIZE);