parisc: Report bad pages as HardwareCorrupted
authorHelge Deller <deller@gmx.de>
Fri, 24 Jul 2020 17:17:52 +0000 (19:17 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 28 Jul 2020 09:19:17 +0000 (11:19 +0200)
The /proc/meminfo file reports physically broken memory pages in the
HardwareCorrupted field. When the parisc kernel boots report physically
bad pages which were recorded in the page deallocation table (PDT) as
HardwareCorrupted too.

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

index 6e8550fefad6a482c4b7848a952c02415c9ea61d..fcc761b0e11b96a13299040127a32547d957ad61 100644 (file)
@@ -18,6 +18,8 @@
 #include <linux/kthread.h>
 #include <linux/initrd.h>
 #include <linux/pgtable.h>
+#include <linux/swap.h>
+#include <linux/swapops.h>
 
 #include <asm/pdc.h>
 #include <asm/pdcpat.h>
@@ -230,6 +232,7 @@ void __init pdc_pdt_init(void)
 
                /* mark memory page bad */
                memblock_reserve(pdt_entry[i] & PAGE_MASK, PAGE_SIZE);
+               num_poisoned_pages_inc();
        }
 }