summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-09-19 13:49:48 -0700
committerDan Williams <dan.j.williams@intel.com>2016-09-19 13:49:48 -0700
commit9d15ce9caaf9ecbec74e3be156a4a57451ed16c2 (patch)
tree079c4f3a0d87cada5ff0aea0429cacb7a0c40632 /tools/testing
parent480b6837aa579991c6acc113bccf838e6a90843c (diff)
downloadtalos-op-linux-9d15ce9caaf9ecbec74e3be156a4a57451ed16c2.tar.gz
talos-op-linux-9d15ce9caaf9ecbec74e3be156a4a57451ed16c2.zip
tools/testing/nvdimm: fix allocation range for mock flush hint tables
Commit 480b6837aa57 "nvdimm: fix PHYS_PFN/PFN_PHYS mixup" identified that we were passing an invalid address to devm_nvdimm_ioremap(). With that fixed it exposed a bug in the memory reservation size for flush hint tables. Since we map a full page we need to mock a full page of memory to back the flush hint table entries. Cc: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/nvdimm/test/nfit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
index dd48f421844c..f64c57bf1d4b 100644
--- a/tools/testing/nvdimm/test/nfit.c
+++ b/tools/testing/nvdimm/test/nfit.c
@@ -603,7 +603,8 @@ static int nfit_test0_alloc(struct nfit_test *t)
return -ENOMEM;
sprintf(t->label[i], "label%d", i);
- t->flush[i] = test_alloc(t, sizeof(u64) * NUM_HINTS,
+ t->flush[i] = test_alloc(t, max(PAGE_SIZE,
+ sizeof(u64) * NUM_HINTS),
&t->flush_dma[i]);
if (!t->flush[i])
return -ENOMEM;
OpenPOWER on IntegriCloud