From: PJ Waskiewicz <ppwaskie@kernel.org>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lukas Wunner <lukas@wunner.de>,
Dan Williams <dan.j.williams@intel.com>,
linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] cxl/acpi.c: Add buggy BIOS hint for CXL ACPI lookup failure
Date: Mon, 8 Apr 2024 12:29:53 -0700 [thread overview]
Message-ID: <ZhRFsUiDieY+HhfV@snoopy> (raw)
In-Reply-To: <20240408093422.000062d9@Huawei.com>
On 24/04/08 09:34AM, Jonathan Cameron wrote:
> On Sun, 7 Apr 2024 19:03:23 -0700
> PJ Waskiewicz <ppwaskie@kernel.org> wrote:
>
> > On 24/04/07 11:28PM, Lukas Wunner wrote:
> >
> > Hi Lukas,
> >
> > > On Sun, Apr 07, 2024 at 02:05:26PM -0700, ppwaskie@kernel.org wrote:
> > > > --- a/drivers/cxl/acpi.c
> > > > +++ b/drivers/cxl/acpi.c
> > > > @@ -504,7 +504,7 @@ static int cxl_get_chbs(struct device *dev, struct acpi_device *hb,
> > > >
> > > > rc = acpi_evaluate_integer(hb->handle, METHOD_NAME__UID, NULL, &uid);
> > > > if (rc != AE_OK) {
> > > > - dev_err(dev, "unable to retrieve _UID\n");
> > > > + dev_err(dev, "unable to retrieve _UID. Potentially buggy BIOS\n");
> > > > return -ENOENT;
> > > > }
> > >
> > > dev_err(dev, FW_BUG "unable to retrieve _UID\n");
> > > ^^^^^^
> > >
> > > There's a macro for that.
> >
> > Doh...it's been awhile since I've crossed buggy BIOS's. Thanks for the
> > review and comment.
> >
> > Updated patch:
> >
> > cxl/acpi.c: Add buggy BIOS hint for CXL ACPI lookup failure
> >
> > From: PJ Waskiewicz <ppwaskie@kernel.org>
> >
> > Currently, Type 3 CXL devices (CXL.mem) can train using host CXL
> > drivers on Emerald Rapids systems. However, on some production
> > systems from some vendors, a buggy BIOS exists that improperly
> > populates the ACPI => PCI mappings. This leads to the cxl_acpi
> > driver to fail probe when it cannot find the root port's _UID, in
> > order to look up the device's CXL attributes in the CEDT.
> >
> > Add a bit more of a descriptive message that the lookup failure
> > could be a bad BIOS, rather than just "failed."
> >
> > v2: Updated message to use existing FW_BUG macro
> Move the change log "v2..." etc below the ---
> as we don't want it in the long term git log + better to send a fresh
> patch in a separate thread.
Thanks, it's been awhile, and my normal (i.e. old) workflow isn't
available to me just quite yet. I can fix and send a new patch, but
I'll hold off and see what Dan's thoughts are after my reply to his
reply.
> Other than that seems reasonable to hint it is probably a bios
> bug - however I wonder how many other cases we should do this for and
> whether it is worth the effort of marking them all?
I can confirm this was definitely a BIOS bug in this particular case.
The vendor spun a quick test BIOS for us to test on an EMR and SPR host,
and the _UID's were finally correct. I could successfully walk the CEDT
and get to the CAPS structs I was after (link speed, bus width, etc.).
I'd be fine also marking the others, but I don't have any easy way to
validate that I'd hit those cases. My BIOS for this platform is only
minorly broken. I suppose it could be mocked in QEMU to cause those to
fail...
-PJ
next prev parent reply other threads:[~2024-04-08 19:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 21:05 [PATCH 1/1] cxl/acpi.c: Add buggy BIOS hint for CXL ACPI lookup failure ppwaskie
2024-04-07 21:28 ` Lukas Wunner
2024-04-08 2:03 ` PJ Waskiewicz
2024-04-08 8:34 ` Jonathan Cameron
2024-04-08 19:29 ` PJ Waskiewicz [this message]
2024-04-08 20:45 ` Dan Williams
2024-04-08 21:32 ` PJ Waskiewicz
2024-04-09 4:22 ` PJ Waskiewicz
2024-04-08 16:54 ` Dan Williams
2024-04-08 19:25 ` PJ Waskiewicz
2024-04-09 13:22 ` Bjorn Helgaas
2024-04-29 5:57 ` PJ Waskiewicz
2024-04-29 15:31 ` Bjorn Helgaas
2024-04-29 18:35 ` Dan Williams
2024-05-01 15:28 ` PJ Waskiewicz
2024-05-01 15:47 ` Dan Williams
2024-05-02 17:34 ` PJ Waskiewicz
2024-05-02 18:29 ` Dan Williams
2024-05-01 17:54 ` Bjorn Helgaas
2024-05-02 17:30 ` PJ Waskiewicz
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=ZhRFsUiDieY+HhfV@snoopy \
--to=ppwaskie@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=dan.j.williams@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
/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