Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
/* 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 */
|