ACPI: Keep sub-table parsing infrastructure available for modules
authorDan Williams <dan.j.williams@intel.com>
Fri, 29 Oct 2021 19:51:32 +0000 (12:51 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 15 Nov 2021 19:02:59 +0000 (11:02 -0800)
commitf64bd790b750dd281406964af40d16adfc88a074
tree486d3003b8c9265179d9143304ee5fb922ab8c9d
parent09eac2ca988a866225a174212765f77c85702206
ACPI: Keep sub-table parsing infrastructure available for modules

The NFIT driver and now the CXL ACPI driver have both open-coded ACPI
table parsing. Before another instance is added arrange for the core
ACPI sub-table parsing to be optionally available to drivers via the
CONFIG_ACPI_TABLE_LIB symbol. If no drivers select the symbol then the
infrastructure reverts back to being tagged __init via the
__init_or_acpilib annotation.

For now, only tag the core sub-table routines and data that the CEDT parsing in
the cxl_acpi driver would want to reuse, a CEDT parsing helper is added
in a later change.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Alison Schofield <alison.schofield@intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/163553709227.2509508.8215196520233473814.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/Kconfig
drivers/acpi/tables.c
include/linux/acpi.h