]>
git.ipfire.org Git - thirdparty/kernel/stable.git/blob - drivers/nvdimm/pfn.h
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 */
31 /* minor-version-3 guarantee the padding and flags are zero */
36 #ifdef CONFIG_SPARSEMEM
37 #define PFN_SECTION_ALIGN_DOWN(x) SECTION_ALIGN_DOWN(x)
38 #define PFN_SECTION_ALIGN_UP(x) SECTION_ALIGN_UP(x)
41 * In this case ZONE_DEVICE=n and we will disable 'pfn' device support,
42 * but we still want pmem to compile.
44 #define PFN_SECTION_ALIGN_DOWN(x) (x)
45 #define PFN_SECTION_ALIGN_UP(x) (x)
48 #define PHYS_SECTION_ALIGN_DOWN(x) PFN_PHYS(PFN_SECTION_ALIGN_DOWN(PHYS_PFN(x)))
49 #define PHYS_SECTION_ALIGN_UP(x) PFN_PHYS(PFN_SECTION_ALIGN_UP(PHYS_PFN(x)))
50 #endif /* __NVDIMM_PFN_H */