History

Merge tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm updates from Dan Williams: "libnvdimm updates for the latest ACPI and UEFI specifications. This pull request also includes new 'struct dax_operations' enabling to undo the abuse of copy_user_nocache() for copy operations to pmem. The dax work originally missed 4.12 to address concerns raised by Al. Summary: - Introduce the _flushcache() family of memory copy helpers and use them for persistent memory write operations on x86. The _flushcache() semantic indicates that the cache is either bypassed for the copy operation (movnt) or any lines dirtied by the copy operation are written back (clwb, clflushopt, or clflush). - Extend dax_operations with ->copy_from_iter() and ->flush() operations. These operations and other infrastructure updates allow all persistent memory specific dax functionality to be pushed into libnvdimm and the pmem driver directly. It also allows dax-specific sysfs attributes to be linked to a host device, for example: /sys/block/pmem0/dax/write_cache - Add support for the new NVDIMM platform/firmware mechanisms introduced in ACPI 6.2 and UEFI 2.7. This support includes the v1.2 namespace label format, extensions to the address-range-scrub command set, new error injection commands, and a new BTT (block-translation-table) layout. These updates support inter-OS and pre-OS compatibility. - Fix a longstanding memory corruption bug in nfit_test. - Make the pmem and nvdimm-region 'badblocks' sysfs files poll(2) capable. - Miscellaneous fixes and small updates across libnvdimm and the nfit driver. Acknowledgements that came after the branch was pushed: commit 6aa734a2f38e ("libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime") was reviewed by Toshi Kani <toshi.kani@hpe.com>" * tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (42 commits) libnvdimm, namespace: record 'lbasize' for pmem namespaces acpi/nfit: Issue Start ARS to retrieve existing records libnvdimm: New ACPI 6.2 DSM functions acpi, nfit: Show bus_dsm_mask in sysfs libnvdimm, acpi, nfit: Add bus level dsm mask for pass thru. acpi, nfit: Enable DSM pass thru for root functions. libnvdimm: passthru functions clear to send libnvdimm, btt: convert some info messages to warn/err libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime libnvdimm: fix the clear-error check in nsio_rw_bytes libnvdimm, btt: fix btt_rw_page not returning errors acpi, nfit: quiet invalid block-aperture-region warnings libnvdimm, btt: BTT updates for UEFI 2.7 format acpi, nfit: constify *_attribute_group libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region libnvdimm, pmem, dax: export a cache control attribute dax: convert to bitmask for flags dax: remove default copy_from_iter fallback libnvdimm, nfit: enable support for volatile ranges libnvdimm, pmem: fix persistence warning ...

Linus Torvalds committed 9 years ago

Commit b6ffe9b2 parents 9f45efb 9d9257347 files · +1504 −460Browse files

Showing the changes to include/uapi/linux (1 of 47 files). Show all

Unified · Split

include/uapi/linux/ndctl.h+41−1
@@ -105,7 +105,8 @@ struct nd_cmd_ars_cap { · 104 unmodified lines
105105 __u32 status;
106106 __u32 max_ars_out;
107107 __u32 clear_err_unit;
108− __u32 reserved;
108+ __u16 flags;
109+ __u16 reserved;
109110 } __packed;
110111
111112 struct nd_cmd_ars_start {
@@ -144,6 +145,43 @@ struct nd_cmd_clear_error { · 32 unmodified lines
144145 __u64 cleared;
145146 } __packed;
146147
148+struct nd_cmd_trans_spa {
149+ __u64 spa;
150+ __u32 status;
151+ __u8 flags;
152+ __u8 _reserved[3];
153+ __u64 trans_length;
154+ __u32 num_nvdimms;
155+ struct nd_nvdimm_device {
156+ __u32 nfit_device_handle;
157+ __u32 _reserved;
158+ __u64 dpa;
159+ } __packed devices[0];
160+
161+} __packed;
162+
163+struct nd_cmd_ars_err_inj {
164+ __u64 err_inj_spa_range_base;
165+ __u64 err_inj_spa_range_length;
166+ __u8 err_inj_options;
167+ __u32 status;
168+} __packed;
169+
170+struct nd_cmd_ars_err_inj_clr {
171+ __u64 err_inj_clr_spa_range_base;
172+ __u64 err_inj_clr_spa_range_length;
173+ __u32 status;
174+} __packed;
175+
176+struct nd_cmd_ars_err_inj_stat {
177+ __u32 status;
178+ __u32 inj_err_rec_count;
179+ struct nd_error_stat_query_record {
180+ __u64 err_inj_stat_spa_range_base;
181+ __u64 err_inj_stat_spa_range_length;
182+ } __packed record[0];
183+} __packed;
184+
147185 enum {
148186 ND_CMD_IMPLEMENTED = 0,
149187
@@ -169,6 +207,7 @@ enum { · 19 unmodified lines
169207 enum {
170208 ND_ARS_VOLATILE = 1,
171209 ND_ARS_PERSISTENT = 2,
210+ ND_ARS_RETURN_PREV_DATA = 1 << 1,
172211 ND_CONFIG_LOCKED = 1,
173212 };
174213
@@ -179,6 +218,7 @@ static inline const char *nvdimm_bus_cmd_name(unsigned cmd) · 4 unmodified lines
179218 [ND_CMD_ARS_START] = "ars_start",
180219 [ND_CMD_ARS_STATUS] = "ars_status",
181220 [ND_CMD_CLEAR_ERROR] = "clear_error",
221+ [ND_CMD_CALL] = "cmd_call",
182222 };
183223
184224 if (cmd < ARRAY_SIZE(names) && names[cmd])