public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>,
	"Schofield, Alison" <alison.schofield@intel.com>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	"bwidawsk@kernel.org" <bwidawsk@kernel.org>,
	"Weiny, Ira" <ira.weiny@intel.com>
Cc: "linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cxl/hdm: dev_warn() on unsupported mixed mode decoder
Date: Sat, 18 Feb 2023 03:17:58 +0000	[thread overview]
Message-ID: <0b4ec83c92cf850b111c248dafdbc2d9439445d0.camel@intel.com> (raw)
In-Reply-To: <20230218013834.31237-1-alison.schofield@intel.com>

On Fri, 2023-02-17 at 17:38 -0800, alison.schofield@intel.com wrote:
> From: Alison Schofield <alison.schofield@intel.com>
> 
> A mixed mode decoder is programmed with device physical addresses
> that span both ram and pmem partitions of a memdev.
> 
> Linux does not support mixed mode decoders. The driver rejects
> sysfs writes that try to set decoder mode to mixed, and if a
> resource bieng allocated is not wholly contained in either the
> pmem or ram partition of a memdev, it is also rejected. Basically,
> the CXL region driver is not going to create regions with mixed
> mode decoders, but the BIOS could.
> 
> If the kernel driver sees the mixed mode decoder, it will fail to
> enable the region, and emit a dev_dbg() message.
> 
> A dev_dbg() is not noisy enough in this case. Change the message
> to be a dev_warn() that explicitly says mixed mode is not supported.
> 
> Suggested-by: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> ---
>  drivers/cxl/core/hdm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Looks good,
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>

> 
> diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
> index 45deda18ed32..9eaf93c8ebb0 100644
> --- a/drivers/cxl/core/hdm.c
> +++ b/drivers/cxl/core/hdm.c
> @@ -294,8 +294,8 @@ static int __cxl_dpa_reserve(struct cxl_endpoint_decoder *cxled,
>         else if (resource_contains(&cxlds->ram_res, res))
>                 cxled->mode = CXL_DECODER_RAM;
>         else {
> -               dev_dbg(dev, "decoder%d.%d: %pr mixed\n", port->id,
> -                       cxled->cxld.id, cxled->dpa_res);
> +               dev_warn(dev, "decoder%d.%d: %pr mixed mode not supported\n",
> +                        port->id, cxled->cxld.id, cxled->dpa_res);
>                 cxled->mode = CXL_DECODER_MIXED;
>         }
>  
> 
> base-commit: a5fcd228ca1db9810ba1ed461c90b6ee933b9daf


  reply	other threads:[~2023-02-18  3:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-18  1:38 [PATCH] cxl/hdm: dev_warn() on unsupported mixed mode decoder alison.schofield
2023-02-18  3:17 ` Verma, Vishal L [this message]
2023-02-20 14:31 ` Jonathan Cameron
2023-02-21 17:14 ` Dave Jiang

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=0b4ec83c92cf850b111c248dafdbc2d9439445d0.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=bwidawsk@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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