• Dan Williams's avatar
    libnvdimm, e820: Register all pmem resources · d76401ad
    Dan Williams authored
    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: default avatarDan Williams <dan.j.williams@intel.com>
    d76401ad
e820.c 2.25 KB