This source file includes following definitions.
- test_and_clear_pmem_poison
- test_and_clear_pmem_poison
1
2 #ifndef __NVDIMM_PMEM_H__
3 #define __NVDIMM_PMEM_H__
4 #include <linux/page-flags.h>
5 #include <linux/badblocks.h>
6 #include <linux/types.h>
7 #include <linux/pfn_t.h>
8 #include <linux/fs.h>
9
10
11 struct pmem_device {
12
13 phys_addr_t phys_addr;
14
15 phys_addr_t data_offset;
16 u64 pfn_flags;
17 void *virt_addr;
18
19 size_t size;
20
21 u32 pfn_pad;
22 struct kernfs_node *bb_state;
23 struct badblocks bb;
24 struct dax_device *dax_dev;
25 struct gendisk *disk;
26 struct dev_pagemap pgmap;
27 };
28
29 long __pmem_direct_access(struct pmem_device *pmem, pgoff_t pgoff,
30 long nr_pages, void **kaddr, pfn_t *pfn);
31
32 #ifdef CONFIG_MEMORY_FAILURE
33 static inline bool test_and_clear_pmem_poison(struct page *page)
34 {
35 return TestClearPageHWPoison(page);
36 }
37 #else
38 static inline bool test_and_clear_pmem_poison(struct page *page)
39 {
40 return false;
41 }
42 #endif
43 #endif