diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-07-14 13:54:50 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2019-01-06 21:24:46 -0800 |
commit | 753a0850e707e9a8c5861356222f9b9e4eba7945 (patch) | |
tree | 8c7e75e158b5debb5d31cdfce8e86d173e55084a /tools | |
parent | 93694f9630b0ed29cda61df58e480dcb34ef52fd (diff) | |
download | linux-753a0850e707e9a8c5861356222f9b9e4eba7945.tar.gz linux-753a0850e707e9a8c5861356222f9b9e4eba7945.tar.bz2 linux-753a0850e707e9a8c5861356222f9b9e4eba7945.zip |
device-dax: Remove multi-resource infrastructure
The multi-resource implementation anticipated discontiguous sub-division
support. That has not yet materialized, delete the infrastructure and
related code.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/nvdimm/dax-dev.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tools/testing/nvdimm/dax-dev.c b/tools/testing/nvdimm/dax-dev.c index 36ee3d8797c3..f36e708265b8 100644 --- a/tools/testing/nvdimm/dax-dev.c +++ b/tools/testing/nvdimm/dax-dev.c @@ -17,20 +17,11 @@ phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff, unsigned long size) { - struct resource *res; + struct resource *res = &dev_dax->region->res; phys_addr_t addr; - int i; - for (i = 0; i < dev_dax->num_resources; i++) { - res = &dev_dax->res[i]; - addr = pgoff * PAGE_SIZE + res->start; - if (addr >= res->start && addr <= res->end) - break; - pgoff -= PHYS_PFN(resource_size(res)); - } - - if (i < dev_dax->num_resources) { - res = &dev_dax->res[i]; + addr = pgoff * PAGE_SIZE + res->start; + if (addr >= res->start && addr <= res->end) { if (addr + size - 1 <= res->end) { if (get_nfit_res(addr)) { struct page *page; @@ -44,6 +35,5 @@ phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff, return addr; } } - return -1; } |