pdt.c (98817a84ff1c755c347ac633ff017a623a631fad) pdt.c (0e5a7ff6e36ad58933d076ddcac36ff14d014692)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Page Deallocation Table (PDT) support
4 *
5 * The Page Deallocation Table (PDT) is maintained by firmware and holds a
6 * list of memory addresses in which memory errors were detected.
7 * The list contains both single-bit (correctable) and double-bit
8 * (uncorrectable) errors.

--- 4 unchanged lines hidden (view full) ---

13 * - add userspace interface via procfs or sysfs to clear PDT
14 */
15
16#include <linux/memblock.h>
17#include <linux/seq_file.h>
18#include <linux/kthread.h>
19#include <linux/initrd.h>
20#include <linux/pgtable.h>
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Page Deallocation Table (PDT) support
4 *
5 * The Page Deallocation Table (PDT) is maintained by firmware and holds a
6 * list of memory addresses in which memory errors were detected.
7 * The list contains both single-bit (correctable) and double-bit
8 * (uncorrectable) errors.

--- 4 unchanged lines hidden (view full) ---

13 * - add userspace interface via procfs or sysfs to clear PDT
14 */
15
16#include <linux/memblock.h>
17#include <linux/seq_file.h>
18#include <linux/kthread.h>
19#include <linux/initrd.h>
20#include <linux/pgtable.h>
21#include <linux/swap.h>
22#include <linux/swapops.h>
21
22#include <asm/pdc.h>
23#include <asm/pdcpat.h>
24#include <asm/sections.h>
25
26enum pdt_access_type {
27 PDT_NONE,
28 PDT_PDC,

--- 196 unchanged lines hidden (view full) ---

225 addr = pdt_entry[i] & PDT_ADDR_PHYS_MASK;
226 if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) &&
227 addr >= initrd_start && addr < initrd_end)
228 pr_crit("CRITICAL: initrd possibly broken "
229 "due to bad memory!\n");
230
231 /* mark memory page bad */
232 memblock_reserve(pdt_entry[i] & PAGE_MASK, PAGE_SIZE);
23
24#include <asm/pdc.h>
25#include <asm/pdcpat.h>
26#include <asm/sections.h>
27
28enum pdt_access_type {
29 PDT_NONE,
30 PDT_PDC,

--- 196 unchanged lines hidden (view full) ---

227 addr = pdt_entry[i] & PDT_ADDR_PHYS_MASK;
228 if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) &&
229 addr >= initrd_start && addr < initrd_end)
230 pr_crit("CRITICAL: initrd possibly broken "
231 "due to bad memory!\n");
232
233 /* mark memory page bad */
234 memblock_reserve(pdt_entry[i] & PAGE_MASK, PAGE_SIZE);
235 num_poisoned_pages_inc();
233 }
234}
235
236
237/*
238 * This is the PDT kernel thread main loop.
239 */
240

--- 121 unchanged lines hidden ---
236 }
237}
238
239
240/*
241 * This is the PDT kernel thread main loop.
242 */
243

--- 121 unchanged lines hidden ---