1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * CXL protocol Error INJection support.
5 * Copyright (c) 2023 Advanced Micro Devices, Inc.
8 * Author: Ben Cheatham <benjamin.cheatham@amd.com>
13 #include <linux/errno.h>
14 #include <linux/types.h>
19 #if IS_ENABLED(CONFIG_ACPI_APEI_EINJ_CXL)
20 int einj_cxl_available_error_type_show(struct seq_file
*m
, void *v
);
21 int einj_cxl_inject_error(struct pci_dev
*dport_dev
, u64 type
);
22 int einj_cxl_inject_rch_error(u64 rcrb
, u64 type
);
23 bool einj_cxl_is_initialized(void);
24 #else /* !IS_ENABLED(CONFIG_ACPI_APEI_EINJ_CXL) */
25 static inline int einj_cxl_available_error_type_show(struct seq_file
*m
,
31 static inline int einj_cxl_inject_error(struct pci_dev
*dport_dev
, u64 type
)
36 static inline int einj_cxl_inject_rch_error(u64 rcrb
, u64 type
)
41 static inline bool einj_cxl_is_initialized(void) { return false; }
42 #endif /* CONFIG_ACPI_APEI_EINJ_CXL */
44 #endif /* EINJ_CXL_H */