mbox series

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

Message ID 168677921156.2787985.6927511816148622557.stgit@djiang5-mobl3
Headers show
Series acpi: Add CDAT parsing support to ACPI tables code | expand

Message

Dave Jiang June 14, 2023, 9:47 p.m. UTC
v4:
- Add file entries in MAINTAINERS. (Hanjun)
- Fixed couple 0-day issues.
v3:
- Move common code to lib/fw_table.c
v2:
- Split out with CONFIG_ACPI_TABLES_LIB to be independent
- Fixed 0-day issues
- Change CDAT releveant names to prefix with cdat/CDAT instead of
  acpi/ACPI. (Jonathan)
- Make table_header a union with cdat table header instead of
  'acpi_table_header'. (Jonathan)
- Removed ACPI_SIG_CDAT, already defined.

Hi Dan,
Rafael has ack'd the series. Please consider pulling them.

1/4: Split out the common code from drivers/acpi/tables.c to lib/fw_table.c
2/4: Add CDAT support
3,4/4: These two are minor patches that has ACPICA impact. Has been merged into
       the ACPICA git repo [3].

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
[3]: https://github.com/acpica/acpica/pull/874

---

Dave Jiang (4):
      acpi: Move common tables helper functions to common lib
      lib/firmware_table: tables: Add CDAT table parsing support
      acpi: fix misnamed define for CDAT DSMAS
      acpi: Add defines for CDAT SSLBIS


 MAINTAINERS              |   2 +
 drivers/acpi/Kconfig     |   1 +
 drivers/acpi/tables.c    | 178 +----------------------------
 include/acpi/actbl1.h    |   5 +-
 include/linux/acpi.h     |  42 ++-----
 include/linux/fw_table.h |  52 +++++++++
 lib/Kconfig              |   3 +
 lib/Makefile             |   2 +
 lib/fw_table.c           | 237 +++++++++++++++++++++++++++++++++++++++
 9 files changed, 315 insertions(+), 207 deletions(-)
 create mode 100644 include/linux/fw_table.h
 create mode 100644 lib/fw_table.c

--

Comments

Hanjun Guo June 19, 2023, 7:40 a.m. UTC | #1
On 2023/6/15 5:48, Dave Jiang wrote:
> Some of the routines in ACPI driver/acpi/tables.c can be shared with
> parsing CDAT. CDAT is a device-provided data structure that is formatted
> similar to a platform provided ACPI table. CDAT is used by CXL and can
> exist on platforms that do not use ACPI. Split out the common routine
> from ACPI to accommodate platforms that do not support ACPI and move that
> to /lib. The common routines can be built outside of ACPI if
> FIRMWARE_TABLES is selected.
> 
> Link: https://lore.kernel.org/linux-cxl/CAJZ5v0jipbtTNnsA0-o5ozOk8ZgWnOg34m34a9pPenTyRLj=6A@mail.gmail.com/
> Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> v4:
> - Add MAINTAINERS entry (Hanjun)
> - Move __init_or_acpilib outside CONFIG_ACPI (0-day)
> ---
>   MAINTAINERS              |    2
>   drivers/acpi/Kconfig     |    1
>   drivers/acpi/tables.c    |  173 ------------------------------------------
>   include/linux/acpi.h     |   42 +++-------
>   include/linux/fw_table.h |   43 ++++++++++
>   lib/Kconfig              |    3 +
>   lib/Makefile             |    2
>   lib/fw_table.c           |  189 ++++++++++++++++++++++++++++++++++++++++++++++
>   8 files changed, 251 insertions(+), 204 deletions(-)
>   create mode 100644 include/linux/fw_table.h
>   create mode 100644 lib/fw_table.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 250518fc70ff..2145438e00dc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -371,6 +371,8 @@ F:	include/acpi/
>   F:	include/linux/acpi.h
>   F:	include/linux/fwnode.h
>   F:	tools/power/acpi/
> +F:	include/linux/fw_table.h
> +F:	lib/fw_table.c

I think it's better in alphabetical order, others look
good to me,

Reviewed-by: Hanjun Guo <guohanjun@huawei.com>

Thanks
Hanjun