acpi: Move common tables helper functions to common lib
authorDave Jiang <dave.jiang@intel.com>
Thu, 12 Oct 2023 18:53:54 +0000 (11:53 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 28 Oct 2023 03:48:03 +0000 (20:48 -0700)
commita103f46633fdcddc2aaca506420f177e8803a2bd
tree80038fad4d6ff7afd9f9f65653c6ba30ec0b8fce
parent8358e8f1596b0b23d3bbc4cf5df5e5e55afc0122
acpi: Move common tables helper functions to common lib

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>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Acked-by: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/169713683430.2205276.17899451119920103445.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
MAINTAINERS
drivers/acpi/Kconfig
drivers/acpi/tables.c
include/linux/acpi.h
include/linux/fw_table.h [new file with mode: 0644]
lib/Kconfig
lib/Makefile
lib/fw_table.c [new file with mode: 0644]