From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: <linux-cxl@vger.kernel.org>, Davidlohr Bueso <dave@stgolabs.net>,
<ben.widawsky@intel.com>, <ira.weiny@intel.com>,
<vishal.l.verma@intel.com>, <alison.schofield@intel.com>
Subject: Re: [PATCH v2 1/6] cxl/mem: Drop DVSEC vs EFI Memory Map sanity check
Date: Fri, 25 Mar 2022 11:34:14 +0000 [thread overview]
Message-ID: <20220325113414.00004754@huawei.com> (raw)
In-Reply-To: <164730734246.3806189.13995924771963139898.stgit@dwillia2-desk3.amr.corp.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;
> }
>
>
next prev parent reply other threads:[~2022-03-25 11:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 1:22 [PATCH v2 0/6] cxl: Handle DVSEC range init failures Dan Williams
2022-03-15 1:22 ` [PATCH v2 1/6] cxl/mem: Drop DVSEC vs EFI Memory Map sanity check Dan Williams
2022-03-17 17:33 ` Ben Widawsky
2022-03-25 11:34 ` Jonathan Cameron [this message]
2022-03-15 1:22 ` [PATCH v2 2/6] cxl/pci: Add debug for DVSEC range init failures Dan Williams
2022-03-17 17:36 ` Ben Widawsky
2022-03-25 11:38 ` Jonathan Cameron
2022-03-15 1:22 ` [PATCH v2 3/6] cxl/mem: Make cxl_dvsec_range() init failure fatal Dan Williams
2022-03-16 2:00 ` Davidlohr Bueso
2022-03-16 2:14 ` Dan Williams
2022-03-17 17:49 ` Ben Widawsky
2022-03-25 11:39 ` Jonathan Cameron
2022-03-15 1:22 ` [PATCH v2 4/6] cxl/pci: Make cxl_dvsec_ranges() failure not fatal to cxl_pci Dan Williams
2022-03-17 17:52 ` Ben Widawsky
2022-03-17 18:20 ` Dan Williams
2022-03-17 18:29 ` Ben Widawsky
2022-03-17 18:30 ` Dan Williams
2022-03-25 11:47 ` Jonathan Cameron
2022-03-15 1:22 ` [PATCH v2 5/6] cxl/mem: Rename cxl_dvsec_decode_init() to cxl_hdm_decode_init() Dan Williams
2022-03-17 17:54 ` Ben Widawsky
2022-03-17 18:45 ` Dan Williams
2022-03-25 11:50 ` Jonathan Cameron
2022-03-15 1:22 ` [PATCH v2 6/6] cxl/mem: Replace redundant debug message with a comment Dan Williams
2022-03-25 11:54 ` Jonathan Cameron
2022-04-08 19:30 ` [PATCH v3 " Dan Williams
2022-03-17 0:39 ` [PATCH v2 0/6] cxl: Handle DVSEC range init failures Davidlohr Bueso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220325113414.00004754@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=ben.widawsky@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox