]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
libnvdimm, nfit: fix persistence domain reporting
authorDan Williams <dan.j.williams@intel.com>
Wed, 21 Mar 2018 22:12:07 +0000 (15:12 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 30 Mar 2018 19:14:26 +0000 (14:14 -0500)
commitb30c52352f5ad10cb7a2dc4acb2d291791661b66
tree20282749c212fc0526e0f2ba290460c5577c9b1b
parent818d76bf82032c9a226f6690ba8ed87dc8a79881
libnvdimm, nfit: fix persistence domain reporting

BugLink: http://bugs.launchpad.net/bugs/1730829
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 96c3a239054a "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: 96c3a239054a ("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>
(cherry picked from commit fe9a552e715dfe5167d52deb74ea16335896bdaf)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/acpi/nfit/core.c
drivers/nvdimm/region_devs.c