Commit 338f6dac authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Dan Williams

libnvdimm: Update persistence domain value for of_pmem and papr_scm device

Currently, kernel shows the below values
	"persistence_domain":"cpu_cache"
	"persistence_domain":"memory_controller"
	"persistence_domain":"unknown"

"cpu_cache" indicates no extra instructions is needed to ensure the persistence
of data in the pmem media on power failure.

"memory_controller" indicates cpu cache flush instructions are required to flush
the data. Platform provides mechanisms to automatically flush outstanding
write data from memory controler to pmem on system power loss.

Based on the above use memory_controller for non volatile regions on ppc64.
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Link: https://lore.kernel.org/r/20200324034821.60869-1-aneesh.kumar@linux.ibm.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 9106137c
...@@ -361,8 +361,10 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p) ...@@ -361,8 +361,10 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p)
if (p->is_volatile) if (p->is_volatile)
p->region = nvdimm_volatile_region_create(p->bus, &ndr_desc); p->region = nvdimm_volatile_region_create(p->bus, &ndr_desc);
else else {
set_bit(ND_REGION_PERSIST_MEMCTRL, &ndr_desc.flags);
p->region = nvdimm_pmem_region_create(p->bus, &ndr_desc); p->region = nvdimm_pmem_region_create(p->bus, &ndr_desc);
}
if (!p->region) { if (!p->region) {
dev_err(dev, "Error registering region %pR from %pOF\n", dev_err(dev, "Error registering region %pR from %pOF\n",
ndr_desc.res, p->dn); ndr_desc.res, p->dn);
......
...@@ -62,8 +62,10 @@ static int of_pmem_region_probe(struct platform_device *pdev) ...@@ -62,8 +62,10 @@ static int of_pmem_region_probe(struct platform_device *pdev)
if (is_volatile) if (is_volatile)
region = nvdimm_volatile_region_create(bus, &ndr_desc); region = nvdimm_volatile_region_create(bus, &ndr_desc);
else else {
set_bit(ND_REGION_PERSIST_MEMCTRL, &ndr_desc.flags);
region = nvdimm_pmem_region_create(bus, &ndr_desc); region = nvdimm_pmem_region_create(bus, &ndr_desc);
}
if (!region) if (!region)
dev_warn(&pdev->dev, "Unable to register region %pR from %pOF\n", dev_warn(&pdev->dev, "Unable to register region %pR from %pOF\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment