summaryrefslogtreecommitdiffstats
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorDan Williams2018-06-02 20:43:39 +0200
committerDan Williams2018-06-03 02:05:43 +0200
commitd76401ade0bb6ab0a70dea317ec115d5425880cf (patch)
tree39897c699f5b0a7e467b5d63fa7a2c676b779b31 /kernel/resource.c
parentlibnvdimm: Debug probe times (diff)
downloadkernel-qcow2-linux-d76401ade0bb6ab0a70dea317ec115d5425880cf.tar.gz
kernel-qcow2-linux-d76401ade0bb6ab0a70dea317ec115d5425880cf.tar.xz
kernel-qcow2-linux-d76401ade0bb6ab0a70dea317ec115d5425880cf.zip
libnvdimm, e820: Register all pmem resources
There is currently a mismatch between the resources that will trigger the e820_pmem driver to register/load and the resources that will actually be surfaced as pmem ranges. register_e820_pmem() uses walk_iomem_res_desc() which includes children and siblings. In contrast, e820_pmem_probe() only considers top level resources. For example the following resource tree results in the driver being loaded, but no resources being registered: 398000000000-39bfffffffff : PCI Bus 0000:ae 39be00000000-39bf07ffffff : PCI Bus 0000:af 39be00000000-39beffffffff : 0000:af:00.0 39be10000000-39beffffffff : Persistent Memory (legacy) Fix this up to allow definitions of "legacy" pmem ranges anywhere in system-physical address space. Not that it is a recommended or safe to define a pmem range in PCI space, but it is useful for debug / experimentation, and the restriction on being a top-level resource was arbitrary. Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 2af6c03858b9..b85f59e8a4b8 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -448,6 +448,7 @@ int walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start,
return __walk_iomem_res_desc(&res, desc, false, arg, func);
}
+EXPORT_SYMBOL_GPL(walk_iomem_res_desc);
/*
* This function calls the @func callback against all memory ranges of type