提交 84e36a9d 编写于 作者: B Ben Widawsky 提交者: Dan Williams

cxl/pci: Remove pci request/release regions

Quoting Dan, "... the request + release regions should probably just be
dropped. It's not like any of the register enumeration would collide
with someone else who already has the registers mapped. The collision
only comes when the registers are mapped for their final usage, and that
will have more precision in the request."
Suggested-by: NDan Williams <dan.j.williams@intel.com>
Signed-off-by: NBen Widawsky <ben.widawsky@intel.com>
Link: https://lore.kernel.org/r/163379785872.692348.8981679111988251260.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: NDan Williams <dan.j.williams@intel.com>
上级 ca76a3a8
...@@ -453,9 +453,6 @@ static int cxl_pci_setup_regs(struct cxl_mem *cxlm) ...@@ -453,9 +453,6 @@ static int cxl_pci_setup_regs(struct cxl_mem *cxlm)
return -ENXIO; return -ENXIO;
} }
if (pci_request_mem_regions(pdev, pci_name(pdev)))
return -ENODEV;
/* Get the size of the Register Locator DVSEC */ /* Get the size of the Register Locator DVSEC */
pci_read_config_dword(pdev, regloc + PCI_DVSEC_HEADER1, &regloc_size); pci_read_config_dword(pdev, regloc + PCI_DVSEC_HEADER1, &regloc_size);
regloc_size = FIELD_GET(PCI_DVSEC_HEADER1_LENGTH_MASK, regloc_size); regloc_size = FIELD_GET(PCI_DVSEC_HEADER1_LENGTH_MASK, regloc_size);
...@@ -499,8 +496,6 @@ static int cxl_pci_setup_regs(struct cxl_mem *cxlm) ...@@ -499,8 +496,6 @@ static int cxl_pci_setup_regs(struct cxl_mem *cxlm)
n_maps++; n_maps++;
} }
pci_release_mem_regions(pdev);
for (i = 0; i < n_maps; i++) { for (i = 0; i < n_maps; i++) {
ret = cxl_map_regs(cxlm, &maps[i]); ret = cxl_map_regs(cxlm, &maps[i]);
if (ret) if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册