Linux CXL
 help / color / mirror / Atom feed
From: "Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cxl/acpi: Warn on unsupported platform config detection
Date: Wed, 26 Jun 2024 12:28:19 +0200	[thread overview]
Message-ID: <21841700.4csPzL39Zc@fdefranc-mobl3> (raw)
In-Reply-To: <667b4f4a46cc6_563929472@dwillia2-xfh.jf.intel.com.notmuch>

On Wednesday, June 26, 2024 1:14:18 AM GMT+2 Dan Williams wrote:

Hi Dan,

> Fabio M. De Francesco wrote:
> > Each Host Bridge instance has a corresponding CXL Host Bridge Structure
> > (CHBS) ACPI table that identifies its capabilities. CHBS tables can be
> > two types: RCRB and CHBCR.
> > 
> > If a Host Bridge is attached to a device that is operating in Restricted
> > CXL Device Mode (RCD), BIOS publishes an RCRB with the base address of
> > registers that describe its capabilities.
> > 
> > However, the new (CXL 2.0+) Component registers (e.g., Extended Security
> > Capability), can only be accessed by means of a base address published
> > with a CHBCR.
> > 
> > An algorithm to locate a CHBCR associated with an RCRB would be too
> > invasive to land without some concrete motivation.
> > 
> > Therefore, just print a message to inform of unsupported config.
> > 
> > Count how many different CHBS "Version" types are detected by
> > cxl_get_chbs_iter(). Then make cxl_get_chbs() print a warning if that sum
> > is greater than 1.
> > 
> > Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
> > ---
> >  drivers/cxl/acpi.c | 20 ++++++++++++++------
> >  1 file changed, 14 insertions(+), 6 deletions(-)
> > 

snip

> > @@ -533,6 +537,10 @@ static int cxl_get_chbs(struct device *dev, struct 
acpi_device *hb,
> >  
> >  	acpi_table_parse_cedt(ACPI_CEDT_TYPE_CHBS, cxl_get_chbs_iter, 
ctx);
> >  
> > +	if (ctx->count > 1)
> > +		/* Disclaim eRCD support given some component register 
may only be found via CHBCR */
> > +		dev_info(dev, "Unsupported platform config, mixed 
Virtual Host and Restricted CXL Host hierarchy.");
> 
> I believe this is already queued, but my personal preference is that
> multiline statements include brackets, or move the comment above the "if
> ()", so either:
> 
> 	/* Disclaim eRCD support given some component register may only be 
found via CHBCR */
> 	if (ctx->count > 1)
> 		dev_info(dev, "Unsupported platform config, mixed Virtual 
Host and Restricted CXL Host hierarchy.");
> 
> ...or:
> 
> 	if (ctx->count > 1) {
> 		/* Disclaim eRCD support given some component register 
may only be found via CHBCR */
> 		dev_info(dev, "Unsupported platform config, mixed Virtual 
Host and Restricted CXL Host hierarchy.");
> 	}
> 
> ...but don't spin the patch just for that fixup.
> 
I'll send v2 mainly for Alison's comments and so I will also add brackets here 
(the second solution meets my preferences).

Thank you,

Fabio





  reply	other threads:[~2024-06-26 10:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 12:59 [PATCH] cxl/acpi: Warn on unsupported platform config detection Fabio M. De Francesco
2024-06-21 20:57 ` Alison Schofield
2024-06-25 23:41   ` Dan Williams
2024-06-26 10:00   ` Fabio M. De Francesco
2024-06-25 23:14 ` Dan Williams
2024-06-26 10:28   ` Fabio M. De Francesco [this message]
2024-06-26  0:10 ` Alison Schofield
2024-06-26  0:45   ` Dan Williams
2024-06-26 10:31     ` Fabio M. De Francesco
2024-06-27  1:09       ` Dan Williams

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=21841700.4csPzL39Zc@fdefranc-mobl3 \
    --to=fabio.m.de.francesco@linux.intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@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