Export the CDAT checksum verify function so CXL driver can use it to verify CDAT coming from the CXL devices. Given that this function isn't actually being used by ACPI internals, removing the define check of APCI_CHECKSUM_ABORT so the function would return failure on checksum fail since the driver will need to know. Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx> --- drivers/acpi/acpica/utcksum.c | 4 +--- include/linux/acpi.h | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpica/utcksum.c b/drivers/acpi/acpica/utcksum.c index c166e4c05ab6..c0f98c8f9a0b 100644 --- a/drivers/acpi/acpica/utcksum.c +++ b/drivers/acpi/acpica/utcksum.c @@ -102,15 +102,13 @@ acpi_ut_verify_cdat_checksum(struct acpi_table_cdat *cdat_table, u32 length) "should be 0x%2.2X", acpi_gbl_CDAT, cdat_table->checksum, checksum)); - -#if (ACPI_CHECKSUM_ABORT) return (AE_BAD_CHECKSUM); -#endif } cdat_table->checksum = checksum; return (AE_OK); } +EXPORT_SYMBOL_GPL(acpi_ut_verify_cdat_checksum); /******************************************************************************* * diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 5e6a876e17ba..09b44afef7df 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1504,9 +1504,16 @@ static inline void acpi_init_ffh(void) { } #ifdef CONFIG_ACPI extern void acpi_device_notify(struct device *dev); extern void acpi_device_notify_remove(struct device *dev); +extern acpi_status +acpi_ut_verify_cdat_checksum(struct acpi_table_cdat *cdat_table, u32 length); #else static inline void acpi_device_notify(struct device *dev) { } static inline void acpi_device_notify_remove(struct device *dev) { } +static inline acpi_status +acpi_ut_verify_cdat_checksum(struct acpi_table_cdat *cdat_table, u32 length) +{ + return (AE_NOT_CONFIGURED); +} #endif #endif /*_LINUX_ACPI_H*/