summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/nfit
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2018-01-31 20:45:43 +0100
committerRoss Zwisler <ross.zwisler@linux.intel.com>2018-02-01 23:01:15 +0100
commit30e6d7bf29daa79d80711d35211c9b60894dbc44 (patch)
treeba88f6beae141ba46dd250186e2a814932c90716 /drivers/acpi/nfit
parentacpi: nfit: Add support for detect platform CPU cache flush on power loss (diff)
downloadlinux-30e6d7bf29daa79d80711d35211c9b60894dbc44.tar.xz
linux-30e6d7bf29daa79d80711d35211c9b60894dbc44.zip
acpi: nfit: add persistent memory control flag for nd_region
Propagate the ADR attribute flag from the NFIT platform capabilities sub-table to nd_region. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Diffstat (limited to 'drivers/acpi/nfit')
-rw-r--r--drivers/acpi/nfit/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index dc775823aea0..aa9d00db763a 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -2675,6 +2675,9 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc,
if(acpi_desc->platform_cap & ACPI_NFIT_CAPABILITY_CACHE_FLUSH)
set_bit(ND_REGION_PERSIST_CACHE, &ndr_desc->flags);
+ if (acpi_desc->platform_cap & ACPI_NFIT_CAPABILITY_MEM_FLUSH)
+ set_bit(ND_REGION_PERSIST_MEMCTRL, &ndr_desc->flags);
+
list_for_each_entry(nfit_memdev, &acpi_desc->memdevs, list) {
struct acpi_nfit_memory_map *memdev = nfit_memdev->memdev;
struct nd_mapping_desc *mapping;