diff options
author | Pankaj Gupta <pagupta@redhat.com> | 2019-07-05 19:33:22 +0530 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2019-07-05 15:19:10 -0700 |
commit | c5d4355d10d414a96ca870b731756b89d068d57a (patch) | |
tree | 9796dcbf336da17f018db742bd0f7e33ada85b2c /drivers/acpi | |
parent | db5d00c93edc0afba1027e51ff3b38dc0e5f7728 (diff) | |
download | linux-stable-c5d4355d10d414a96ca870b731756b89d068d57a.tar.gz linux-stable-c5d4355d10d414a96ca870b731756b89d068d57a.tar.bz2 linux-stable-c5d4355d10d414a96ca870b731756b89d068d57a.zip |
libnvdimm: nd_region flush callback support
This patch adds functionality to perform flush from guest
to host over VIRTIO. We are registering a callback based
on 'nd_region' type. virtio_pmem driver requires this special
flush function. For rest of the region types we are registering
existing flush function. Report error returned by host fsync
failure to userspace.
Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/nfit/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 23022cf20d26..c02fa27dd3f3 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -2426,7 +2426,7 @@ static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw, offset = to_interleave_offset(offset, mmio); writeq(cmd, mmio->addr.base + offset); - nvdimm_flush(nfit_blk->nd_region); + nvdimm_flush(nfit_blk->nd_region, NULL); if (nfit_blk->dimm_flags & NFIT_BLK_DCR_LATCH) readq(mmio->addr.base + offset); @@ -2475,7 +2475,7 @@ static int acpi_nfit_blk_single_io(struct nfit_blk *nfit_blk, } if (rw) - nvdimm_flush(nfit_blk->nd_region); + nvdimm_flush(nfit_blk->nd_region, NULL); rc = read_blk_stat(nfit_blk, lane) ? -EIO : 0; return rc; |