mbox series

[v3,0/3] acpi: add support for CXL _OSC

Message ID 20220330181434.1515791-1-vishal.l.verma@intel.com
Headers show
Series acpi: add support for CXL _OSC | expand

Message

Verma, Vishal L March 30, 2022, 6:14 p.m. UTC
Changes since v2[1]:
- Add a prep patch replacing pointer arithmetic with a helper (David)
- Make is_pcie/is_cxl helpers inline (David)
- Tidy up the if/else in the above helpers (David)

Add support for using the CXL definition of _OSC where applicable, and
negotiating CXL specific support and control bits.

Patch 1 is a preliminary cleanup that replaces open-coded pointer
arithmetic to retrieve the Control DWORD with an inline helper.

Patch 2 adds the new CXL _OSC UUID, and uses it instead of the PCI UUID
when a root port is CXL enabled. It provides a fallback method for
CXL-1.1 platforms that may not implement the CXL-2.0 _OSC.

Patch 3 performs negotiation for the CXL specific _OSC support and
control bits.

I've tested these against a custom qemu[2], which adds the CXL _OSC (in
addition to other CXL support). Specifically, _OSC support is added
here[3].

[1]: https://lore.kernel.org/linux-cxl/20220326002430.797244-1-vishal.l.verma@intel.com/
[2]: https://gitlab.com/jic23/qemu/-/tree/cxl-v8-draft
[3]: https://gitlab.com/jic23/qemu/-/commit/1d67df6b6e3716c27462873f3451956f5c0673a3

Dan Williams (1):
  PCI/ACPI: Use CXL _OSC instead of PCIe _OSC

Vishal Verma (2):
  acpi: add a helper for retrieving _OSC Control DWORDs
  acpi/pci_root: negotiate CXL _OSC

 include/linux/acpi.h    |  44 ++++++++-
 include/acpi/acpi_bus.h |  12 ++-
 drivers/acpi/bus.c      |   2 +-
 drivers/acpi/pci_root.c | 207 ++++++++++++++++++++++++++++++++++------
 4 files changed, 231 insertions(+), 34 deletions(-)


base-commit: 05e815539f3f161585c13a9ab023341bade2c52f