Message ID | 164730734246.3806189.13995924771963139898.stgit@dwillia2-desk3.amr.corp.intel.com |
---|---|
State | Accepted |
Commit | e08063fb87944b1db963e94b833608318179708d |
Headers | show |
Series | cxl: Handle DVSEC range init failures | expand |
On 22-03-14 18:22:22, Dan Williams wrote: > When the driver finds legacy DVSEC ranges active on a CXL Memory > Expander it indicates that platform firmware is not aware of, or is > deliberately disabling common CXL 2.0 operation. In this case Linux > generally has no choice, but to leave the device alone. > > The driver attempts to validate that the DVSEC range is in the EFI > memory map. Remove that logic since there is no requirement that the > BIOS publish DVSEC ranges in the EFI Memory Map. > > In the future the driver will want to permanently reserve this capacity > out of the available CFMWS capacity and hide it from > request_free_mem_region(), but it serves no purpose to warn about the > range not appearing in the EFI Memory Map. > > Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> > Signed-off-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Ben Widawsky <ben.widawsky@intel.com>
On Mon, 14 Mar 2022 18:22:22 -0700 Dan Williams <dan.j.williams@intel.com> wrote: > When the driver finds legacy DVSEC ranges active on a CXL Memory > Expander it indicates that platform firmware is not aware of, or is > deliberately disabling common CXL 2.0 operation. In this case Linux > generally has no choice, but to leave the device alone. > > The driver attempts to validate that the DVSEC range is in the EFI > memory map. Remove that logic since there is no requirement that the > BIOS publish DVSEC ranges in the EFI Memory Map. > > In the future the driver will want to permanently reserve this capacity > out of the available CFMWS capacity and hide it from > request_free_mem_region(), but it serves no purpose to warn about the > range not appearing in the EFI Memory Map. > > Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> > Signed-off-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > drivers/cxl/mem.c | 24 +----------------------- > 1 file changed, 1 insertion(+), 23 deletions(-) > > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > index 49a4b1c47299..cd4e8bba82aa 100644 > --- a/drivers/cxl/mem.c > +++ b/drivers/cxl/mem.c > @@ -158,30 +158,8 @@ static int cxl_mem_probe(struct device *dev) > * is no use in trying to manage those. > */ > if (!cxl_dvsec_decode_init(cxlds)) { > - struct cxl_endpoint_dvsec_info *info = &cxlds->info; > - int i; > - > - /* */ > - for (i = 0; i < 2; i++) { > - u64 base, size; > - > - /* > - * Give a nice warning to the user that BIOS has really > - * botched things for them if it didn't place DVSEC > - * ranges in the memory map. > - */ > - base = info->dvsec_range[i].start; > - size = range_len(&info->dvsec_range[i]); > - if (size && !region_intersects(base, size, > - IORESOURCE_SYSTEM_RAM, > - IORES_DESC_NONE)) { > - dev_err(dev, > - "DVSEC range %#llx-%#llx must be reserved by BIOS, but isn't\n", > - base, base + size - 1); > - } > - } > dev_err(dev, > - "Active DVSEC range registers in use. Will not bind.\n"); > + "Legacy range registers configuration prevents HDM operation.\n"); > return -EBUSY; > } > >
diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c index 49a4b1c47299..cd4e8bba82aa 100644 --- a/drivers/cxl/mem.c +++ b/drivers/cxl/mem.c @@ -158,30 +158,8 @@ static int cxl_mem_probe(struct device *dev) * is no use in trying to manage those. */ if (!cxl_dvsec_decode_init(cxlds)) { - struct cxl_endpoint_dvsec_info *info = &cxlds->info; - int i; - - /* */ - for (i = 0; i < 2; i++) { - u64 base, size; - - /* - * Give a nice warning to the user that BIOS has really - * botched things for them if it didn't place DVSEC - * ranges in the memory map. - */ - base = info->dvsec_range[i].start; - size = range_len(&info->dvsec_range[i]); - if (size && !region_intersects(base, size, - IORESOURCE_SYSTEM_RAM, - IORES_DESC_NONE)) { - dev_err(dev, - "DVSEC range %#llx-%#llx must be reserved by BIOS, but isn't\n", - base, base + size - 1); - } - } dev_err(dev, - "Active DVSEC range registers in use. Will not bind.\n"); + "Legacy range registers configuration prevents HDM operation.\n"); return -EBUSY; }