diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-21 13:55:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-21 13:55:29 -0400 |
commit | 6cb2e9ee51b5f1539f027346a02904e282b87d4d (patch) | |
tree | bf940785b622e8792ae943af9b92f55c5202612e /include/linux/libnvdimm.h | |
parent | 10fd71780f7d155f4e35fecfad0ebd4a725a244b (diff) | |
parent | 5b26db95fee3f1ce0d096b2de0ac6f3716171093 (diff) |
Merge tag 'libnvdimm-for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm updates from Dan Williams:
"Some reworks to better support nvdimms on powerpc and an nvdimm
security interface update:
- Rework the nvdimm core to accommodate architectures with different
page sizes and ones that can change supported huge page sizes at
boot time rather than a compile time constant.
- Introduce a distinct 'frozen' attribute for the nvdimm security
state since it is independent of the locked state.
- Miscellaneous fixups"
* tag 'libnvdimm-for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
libnvdimm: Use PAGE_SIZE instead of SZ_4K for align check
libnvdimm/label: Remove the dpa align check
libnvdimm/pfn_dev: Add page size and struct page size to pfn superblock
libnvdimm/pfn_dev: Add a build check to make sure we notice when struct page size change
libnvdimm/pmem: Advance namespace seed for specific probe errors
libnvdimm/region: Rewrite _probe_success() to _advance_seeds()
libnvdimm/security: Consolidate 'security' operations
libnvdimm/security: Tighten scope of nvdimm->busy vs security operations
libnvdimm/security: Introduce a 'frozen' attribute
libnvdimm, region: Use struct_size() in kzalloc()
tools/testing/nvdimm: Fix fallthrough warning
libnvdimm/of_pmem: Provide a unique name for bus provider
Diffstat (limited to 'include/linux/libnvdimm.h')
-rw-r--r-- | include/linux/libnvdimm.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h index 7a64b3ddb408..b6eddf912568 100644 --- a/include/linux/libnvdimm.h +++ b/include/linux/libnvdimm.h | |||
@@ -160,8 +160,11 @@ static inline struct nd_blk_region_desc *to_blk_region_desc( | |||
160 | 160 | ||
161 | } | 161 | } |
162 | 162 | ||
163 | enum nvdimm_security_state { | 163 | /* |
164 | NVDIMM_SECURITY_ERROR = -1, | 164 | * Note that separate bits for locked + unlocked are defined so that |
165 | * 'flags == 0' corresponds to an error / not-supported state. | ||
166 | */ | ||
167 | enum nvdimm_security_bits { | ||
165 | NVDIMM_SECURITY_DISABLED, | 168 | NVDIMM_SECURITY_DISABLED, |
166 | NVDIMM_SECURITY_UNLOCKED, | 169 | NVDIMM_SECURITY_UNLOCKED, |
167 | NVDIMM_SECURITY_LOCKED, | 170 | NVDIMM_SECURITY_LOCKED, |
@@ -182,7 +185,7 @@ enum nvdimm_passphrase_type { | |||
182 | }; | 185 | }; |
183 | 186 | ||
184 | struct nvdimm_security_ops { | 187 | struct nvdimm_security_ops { |
185 | enum nvdimm_security_state (*state)(struct nvdimm *nvdimm, | 188 | unsigned long (*get_flags)(struct nvdimm *nvdimm, |
186 | enum nvdimm_passphrase_type pass_type); | 189 | enum nvdimm_passphrase_type pass_type); |
187 | int (*freeze)(struct nvdimm *nvdimm); | 190 | int (*freeze)(struct nvdimm *nvdimm); |
188 | int (*change_key)(struct nvdimm *nvdimm, | 191 | int (*change_key)(struct nvdimm *nvdimm, |