Re: [PATCH v4 3/3] PCI/ACPI: negotiate CXL _OSC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2022-04-05 at 16:00 +0200, Rafael J. Wysocki wrote:
> On Thu, Mar 31, 2022 at 10:20 PM Vishal Verma <vishal.l.verma@xxxxxxxxx> wrote:
> > 
> > Add full support for negotiating _OSC as defined in the CXL 2.0 spec, as
> > applicable to CXL-enabled platforms. Advertise support for the CXL
> > features we support - 'CXL 2.0 port/device register access', 'Protocol
> > Error Reporting', and 'CXL Native Hot Plug'. Request control for 'CXL
> > Memory Error Reporting'. The requests are dependent on CONFIG_* based
> > prerequisites, and prior PCI enabling, similar to how the standard PCI
> > _OSC bits are determined.
> > 
> > The CXL specification does not define any additional constraints on
> > the hotplug flow beyond PCIe native hotplug, so a kernel that supports
> > native PCIe hotplug, supports CXL hotplug. For error handling protocol
> > and link errors just use PCIe AER. There is nascent support for
> > amending AER events with CXL specific status [1], but there's
> > otherwise no additional OS responsibility for CXL errors beyond PCIe
> > AER. CXL Memory Errors behave the same as typical memory errors so
> > CONFIG_MEMORY_FAILURE is sufficient to indicate support to platform
> > firmware.
> > 
> > [1]: https://lore.kernel.org/linux-cxl/164740402242.3912056.8303625392871313860.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
> > 
> > Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> > Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
> > Cc: Robert Moore <robert.moore@xxxxxxxxx>
> > Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> > Signed-off-by: Vishal Verma <vishal.l.verma@xxxxxxxxx>
> > ---
> >  include/linux/acpi.h    |  28 +++++++-
> >  include/acpi/acpi_bus.h |   6 +-
> >  drivers/acpi/pci_root.c | 145 ++++++++++++++++++++++++++++++++++------
> >  3 files changed, 157 insertions(+), 22 deletions(-)
> > 
> > diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> > index fc40da914315..cf360b9642d9 100644
> > --- a/include/linux/acpi.h
> > +++ b/include/linux/acpi.h
> > @@ -554,10 +554,15 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
> >  #define OSC_PCI_CAPABILITY_DWORDS              3
> >  #define OSC_CXL_CAPABILITY_DWORDS              5
> > 
> > -/* Indexes into _OSC Capabilities Buffer (DWORDs 2 & 3 are device-specific) */
> > +/*
> > + * Indexes into _OSC Capabilities Buffer
> > + * DWORDs 2 & 3 are device-specific, and 4 & 5 are specific to CXL platforms
> 
> Say "DWORDs 2 through 5 are device-specific" and you don't need to
> mention CXL here.
> 
> > + */
> >  #define OSC_QUERY_DWORD                                0       /* DWORD 1 */
> >  #define OSC_SUPPORT_DWORD                      1       /* DWORD 2 */
> >  #define OSC_CONTROL_DWORD                      2       /* DWORD 3 */
> > +#define OSC_CXL_SUPPORT_DWORD                  3       /* DWORD 4 */
> > +#define OSC_CXL_CONTROL_DWORD                  4       /* DWORD 5 */
> 
> I would rename the last two symbols as OSC_EXT_SUPPORT_DWORD and
> OSC_EXT_CONTROL_DWORD (see below for an explanation).
> 
> 
Yep, dropping CXL references here and the 'extended' naming sounds
good, I'll update with these changes.




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux