OpenCloudOS-Kernel/drivers/nvdimm
Dan Williams fe9a552e71 libnvdimm, nfit: fix persistence domain reporting
The persistence domain is a point in the platform where once writes
reach that destination the platform claims it will make them persistent
relative to power loss. In the ACPI NFIT this is currently communicated
as 2 bits in the "NFIT - Platform Capabilities Structure". The bits
comprise a hierarchy, i.e. bit0 "CPU Cache Flush to NVDIMM Durability on
Power Loss Capable" implies bit1 "Memory Controller Flush to NVDIMM
Durability on Power Loss Capable".

Commit 96c3a23905 "libnvdimm: expose platform persistence attr..."
shows the persistence domain as flags, but it's really an enumerated
hierarchy.

Fix this newly introduced user ABI to show the closest available
persistence domain before userspace develops dependencies on seeing, or
needing to develop code to tolerate, the raw NFIT flags communicated
through the libnvdimm-generic region attribute.

Fixes: 96c3a23905 ("libnvdimm: expose platform persistence attr...")
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2018-03-21 15:12:07 -07:00
..
Kconfig treewide: Fix typos in Kconfig 2017-10-12 15:42:00 +02:00
Makefile libnvdimm for 4.15 2017-11-17 09:51:57 -08:00
badrange.c libnvdimm, badrange: remove a WARN for list_empty 2017-11-02 10:42:30 -07:00
blk.c libnvdimm, {btt, blk}: do integrity setup before add_disk() 2018-03-07 13:50:09 -08:00
btt.c libnvdimm, {btt, blk}: do integrity setup before add_disk() 2018-03-07 13:50:09 -08:00
btt.h libnvdimm, btt: Fix an incompatibility in the log layout 2017-12-21 14:59:27 -08:00
btt_devs.c libnvdimm: rename nd_sector_size_{show,store} to nd_size_select_{show,store} 2017-08-11 17:36:54 -07:00
bus.c nfit, libnvdimm: deprecate the generic SMART ioctl 2017-12-04 10:19:20 -08:00
claim.c libnvdimm, btt: rework error clearing 2017-08-31 15:05:10 -07:00
core.c libnvdimm: move poison list functions to a new 'badrange' file 2017-11-02 10:42:30 -07:00
dax_devs.c Merge branch 'for-4.13/dax' into libnvdimm-for-next 2017-07-03 16:54:58 -07:00
dimm.c acpi, nfit: add support for the _LSI, _LSR, and _LSW label methods 2017-10-07 10:03:40 -07:00
dimm_devs.c libnvdimm: introduce 'flags' attribute for DIMM 'lock' and 'alias' status 2017-10-07 10:04:06 -07:00
e820.c libnvdimm, e820: use module_platform_driver 2016-12-05 08:52:21 -08:00
label.c libnvdimm, namespace: fix label initialization to use valid seq numbers 2017-09-28 09:13:06 -07:00
label.h libnvdimm, btt: BTT updates for UEFI 2.7 format 2017-06-29 13:50:38 -07:00
namespace_devs.c libnvdimm, namespace: remove redundant initialization of 'nd_mapping' 2018-02-03 00:23:01 -07:00
nd-core.h libnvdimm: move poison list functions to a new 'badrange' file 2017-11-02 10:42:30 -07:00
nd.h memremap: change devm_memremap_pages interface to use struct dev_pagemap 2018-01-08 11:46:23 -08:00
pfn.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pfn_devs.c libnvdimm: remove redundant assignment to pointer 'dev' 2018-03-13 21:35:50 -07:00
pmem.c libnvdimm: re-enable deep flush for pmem devices via fsync() 2018-03-02 19:31:40 -08:00
pmem.h memremap: change devm_memremap_pages interface to use struct dev_pagemap 2018-01-08 11:46:23 -08:00
region.c libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime 2017-06-30 18:56:03 -07:00
region_devs.c libnvdimm, nfit: fix persistence domain reporting 2018-03-21 15:12:07 -07:00