diff options
author | Dan Williams <dan.j.williams@intel.com> | 2024-03-13 00:09:20 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2024-03-13 00:09:20 -0700 |
commit | 75f4d93ee8faf08546f3cc4c3d96c866b24358c8 (patch) | |
tree | e493ce7ffecc18026d67fbf13bd031da0d13d77f /include/linux | |
parent | Merge branch 'for-6.9/cxl-qos' into for-6.9/cxl (diff) | |
parent | EINJ, Documentation: Update EINJ kernel doc (diff) | |
download | wireguard-linux-75f4d93ee8faf08546f3cc4c3d96c866b24358c8.tar.xz wireguard-linux-75f4d93ee8faf08546f3cc4c3d96c866b24358c8.zip |
Merge branch 'for-6.9/cxl-einj' into for-6.9/cxl
Pick up support for injecting errors via ACPI EINJ into the CXL protocol
for v6.9.
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/einj-cxl.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/linux/einj-cxl.h b/include/linux/einj-cxl.h new file mode 100644 index 000000000000..624ff6ff41f9 --- /dev/null +++ b/include/linux/einj-cxl.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * CXL protocol Error INJection support. + * + * Copyright (c) 2023 Advanced Micro Devices, Inc. + * All Rights Reserved. + * + * Author: Ben Cheatham <benjamin.cheatham@amd.com> + */ +#ifndef EINJ_CXL_H +#define EINJ_CXL_H + +#include <linux/errno.h> +#include <linux/types.h> + +struct pci_dev; +struct seq_file; + +#if IS_ENABLED(CONFIG_ACPI_APEI_EINJ_CXL) +int einj_cxl_available_error_type_show(struct seq_file *m, void *v); +int einj_cxl_inject_error(struct pci_dev *dport_dev, u64 type); +int einj_cxl_inject_rch_error(u64 rcrb, u64 type); +bool einj_cxl_is_initialized(void); +#else /* !IS_ENABLED(CONFIG_ACPI_APEI_EINJ_CXL) */ +static inline int einj_cxl_available_error_type_show(struct seq_file *m, + void *v) +{ + return -ENXIO; +} + +static inline int einj_cxl_inject_error(struct pci_dev *dport_dev, u64 type) +{ + return -ENXIO; +} + +static inline int einj_cxl_inject_rch_error(u64 rcrb, u64 type) +{ + return -ENXIO; +} + +static inline bool einj_cxl_is_initialized(void) { return false; } +#endif /* CONFIG_ACPI_APEI_EINJ_CXL */ + +#endif /* EINJ_CXL_H */ |