| /* SPDX-License-Identifier: GPL-2.0 */ |
| #ifndef __NVDIMM_PMEM_H__ |
| #define __NVDIMM_PMEM_H__ |
| #include <linux/page-flags.h> |
| #include <linux/badblocks.h> |
| /* this definition is in it's own header for tools/testing/nvdimm to consume */ |
| /* One contiguous memory region per device */ |
| /* when non-zero this device is hosting a 'pfn' instance */ |
| /* immutable base size of the namespace */ |
| /* trim size when namespace capacity has been section aligned */ |
| struct kernfs_node *bb_state; |
| struct dax_device *dax_dev; |
| struct dev_pagemap pgmap; |
| long __pmem_direct_access(struct pmem_device *pmem, pgoff_t pgoff, |
| long nr_pages, void **kaddr, pfn_t *pfn); |
| #ifdef CONFIG_MEMORY_FAILURE |
| static inline bool test_and_clear_pmem_poison(struct page *page) |
| return TestClearPageHWPoison(page); |
| static inline bool test_and_clear_pmem_poison(struct page *page) |
| #endif /* __NVDIMM_PMEM_H__ */ |