From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "rafael@kernel.org" <rafael@kernel.org>
Cc: "linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
"Jonathan.Cameron@huawei.com" <Jonathan.Cameron@huawei.com>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
"Moore, Robert" <robert.moore@intel.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"dave@stgolabs.net" <dave@stgolabs.net>
Subject: Re: [PATCH v4 2/3] PCI/ACPI: Use CXL _OSC instead of PCIe _OSC
Date: Tue, 5 Apr 2022 15:59:24 +0000 [thread overview]
Message-ID: <fb6bdaff0e032459d820f6f2f78768f56e7202af.camel@intel.com> (raw)
In-Reply-To: <CAJZ5v0hfTXkHQE2j8B00Qvn1vuW0a-5AoUG-dSJvCH5PW70AZw@mail.gmail.com>
On Tue, 2022-04-05 at 15:47 +0200, Rafael J. Wysocki wrote:
> First off, I would change the subject to something like "Prefer CXL
> _OSC to PCI _OSC for CXL host bridges". As is, it kind of suggests
> that the CXL _OSC is preferred in all cases.
>
> On Thu, Mar 31, 2022 at 10:20 PM Vishal Verma <vishal.l.verma@intel.com> wrote:
> >
> > From: Dan Williams <dan.j.williams@intel.com>
> >
> > OB In preparation for negotiating OS control of CXL _OSC features, do the
> > minimal enabling to use CXL _OSC to handle the base PCIe feature
> > negotiation. Recall that CXL _OSC is a super-set of PCIe _OSC and the
> > CXL 2.0 specification mandates: "If a CXL Host Bridge device exposes CXL
> > _OSC, CXL aware OSPM shall evaluate CXL _OSC and not evaluate PCIe
> > _OSC."
> >
> > Rather than pass a boolean flag alongside @root to all the helper
> > functions that need to consider PCIe specifics, add is_pcie() and
> > is_cxl() helper functions to check the flavor of @root. This also
> > allows for dynamic fallback to PCIe _OSC in cases where an attempt to
> > use CXL _OXC fails. This can happen on CXL 1.1 platforms that publish
> > ACPI0016 devices to indicate CXL host bridges, but do not publish the
> > optional CXL _OSC method. CXL _OSC is mandatory for CXL 2.0 hosts.
> >
> > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> > Cc: Robert Moore <robert.moore@intel.com>
> > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> > ---
> > include/linux/acpi.h | 4 +++
> > include/acpi/acpi_bus.h | 6 ++++
> > drivers/acpi/pci_root.c | 70 ++++++++++++++++++++++++++++++++---------
> > 3 files changed, 65 insertions(+), 15 deletions(-)
> >
[..]
> >
> > @@ -587,8 +619,16 @@ static int acpi_pci_root_add(struct acpi_device *device,
> >
> > root->mcfg_addr = acpi_pci_root_get_mcfg_addr(handle);
> >
> > - is_pcie = strcmp(acpi_device_hid(device), "PNP0A08") == 0;
> > - negotiate_os_control(root, &no_aspm, is_pcie);
> > + acpi_hid = acpi_device_hid(root->device);
> > + if (strcmp(acpi_hid, "PNP0A08") == 0)
> > + root->bridge_type = ACPI_BRIDGE_TYPE_PCIE;
> > + else if (strcmp(acpi_hid, "ACPI0016") == 0)
> > + root->bridge_type = ACPI_BRIDGE_TYPE_CXL;
> > + else
> > + dev_warn(&device->dev, "unknown bridge type with hid: %s\n",
> > + acpi_hid);
>
> Second, because "device" is an ACPI device object and it has a _HID,
> its name should include the ID in this case, so including it into the
> message once more is redundant.
>
> Also, if this is neither PCIe nor CXL, it should be a "legacy" PCI
> host bridge and that is not an error, so maybe use dev_dbg("Assuming
> non-PCIe host bridge\n")?
Agreed with both points, I'll make the changes for v5.
next prev parent reply other threads:[~2022-04-05 20:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 20:20 [PATCH v4 0/3] PCI/ACPI: add support for CXL _OSC Vishal Verma
2022-03-31 20:20 ` [PATCH v4 1/3] PCI/ACPI: add a helper for retrieving _OSC Control DWORDs Vishal Verma
2022-04-05 13:39 ` Rafael J. Wysocki
2022-03-31 20:20 ` [PATCH v4 2/3] PCI/ACPI: Use CXL _OSC instead of PCIe _OSC Vishal Verma
2022-04-05 13:47 ` Rafael J. Wysocki
2022-04-05 15:59 ` Verma, Vishal L [this message]
2022-03-31 20:20 ` [PATCH v4 3/3] PCI/ACPI: negotiate CXL _OSC Vishal Verma
2022-04-01 20:40 ` Davidlohr Bueso
2022-04-01 21:34 ` Dan Williams
2022-04-04 20:30 ` Davidlohr Bueso
2022-04-05 15:57 ` Verma, Vishal L
2022-04-05 14:00 ` Rafael J. Wysocki
2022-04-05 15:55 ` Verma, Vishal L
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=fb6bdaff0e032459d820f6f2f78768f56e7202af.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=robert.moore@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