mbox series

[0/4] acpi: Add CDAT parsing support to ACPI tables code

Message ID 168330787964.2042604.17648905811002211147.stgit@djiang5-mobl3 (mailing list archive)
Headers show
Series acpi: Add CDAT parsing support to ACPI tables code | expand

Message

Dave Jiang May 5, 2023, 5:32 p.m. UTC
Hi Rafael,
I've broken out the "cxl: Add support for QTG ID retrieval for CXL subsystem" [1]
series in order to make it more manageable. Here's the first part of the ACPI
changes. These changes are added to allow reuse of ACPI tables code to parse
the CDAT tables. While CDAT is not part of ACPI, the table structures are similar
to ACPI layouts that the code can be reused with some small modifications.

However, in order to be properly utilized by CXL users, the tables code needs
to be refactored out to be independent of ACPI. For example, a PPC BE host may
have CXL and does not have ACPI support. But it will have CDAT to read from
devices and switches. patch 4/4 included is not APCI, but I have included it as
a reference to this problem. Currently as you can see, I have the cdat code in
CXL as "cxl_core-$(CONFIG_ACPI) += cdat.o". That will not work for a scenario
with the PPC host mentioned above since it won't compile in ACPI support. I'm
looking for guidance and to start the discussion on how we want the table handling
code to be broken out to be independent of CONFIG_ACPI. Thank you!

The whole series is at [2] for convenience.

[1]: https://lore.kernel.org/linux-cxl/168193556660.1178687.15477509915255912089.stgit@djiang5-mobl3/T/#t                                                                                               
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/djiang/linux.git/log/?h=cxl-qtg

---

Dave Jiang (4):
      acpi: tables: Add CDAT table parsing support
      acpi: Add header struct in CDAT subtables
      acpi: fix misnamed define for CDAT DSMAS
      cxl: Add callback to parse the DSMAS subtables from CDAT


 drivers/acpi/tables.c     | 47 +++++++++++++++++++++++++++++++++++++--
 drivers/cxl/core/Makefile |  1 +
 drivers/cxl/core/cdat.c   | 40 +++++++++++++++++++++++++++++++++
 drivers/cxl/cxl.h         | 18 +++++++++++++++
 drivers/cxl/port.c        | 22 ++++++++++++++++++
 include/acpi/actbl1.h     | 11 ++++++++-
 include/linux/acpi.h      |  4 ++++
 7 files changed, 140 insertions(+), 3 deletions(-)
 create mode 100644 drivers/cxl/core/cdat.c

--