1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2014-2015, Intel Corporation.
9 #include <linux/types.h>
10 #include <linux/mmzone.h>
12 #define PFN_SIG_LEN 16
13 #define PFN_SIG "NVDIMM_PFN_INFO\0"
14 #define DAX_SIG "NVDIMM_DAX_INFO\0"
17 u8 signature[PFN_SIG_LEN];
23 __le64 dataoff; /* relative to namespace_base + start_pad */
26 /* minor-version-1 additions for section alignment */
29 /* minor-version-2 record the base alignment of the mapping */
35 #ifdef CONFIG_SPARSEMEM
36 #define PFN_SECTION_ALIGN_DOWN(x) SECTION_ALIGN_DOWN(x)
37 #define PFN_SECTION_ALIGN_UP(x) SECTION_ALIGN_UP(x)
40 * In this case ZONE_DEVICE=n and we will disable 'pfn' device support,
41 * but we still want pmem to compile.
43 #define PFN_SECTION_ALIGN_DOWN(x) (x)
44 #define PFN_SECTION_ALIGN_UP(x) (x)
47 #define PHYS_SECTION_ALIGN_DOWN(x) PFN_PHYS(PFN_SECTION_ALIGN_DOWN(PHYS_PFN(x)))
48 #define PHYS_SECTION_ALIGN_UP(x) PFN_PHYS(PFN_SECTION_ALIGN_UP(PHYS_PFN(x)))
49 #endif /* __NVDIMM_PFN_H */