mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-27 12:32:50 +00:00
Enable survivability mode if supported and configfs attribute is set.
Enabling survivability mode manually is useful in cases where pcode does
not detect failure, validation and for IFR (in-field-repair).
To set configfs survivability mode attribute for a device
echo 1 > /sys/kernel/config/xe/0000:03:00.0/survivability_mode
The card enters survivability mode if supported
v2: add a log if survivability mode is enabled for unsupported
platforms (Rodrigo)
Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250407051414.1651616-4-riana.tauro@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
25 lines
693 B
C
25 lines
693 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2025 Intel Corporation
|
|
*/
|
|
#ifndef _XE_CONFIGFS_H_
|
|
#define _XE_CONFIGFS_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct pci_dev;
|
|
|
|
#if IS_ENABLED(CONFIG_CONFIGFS_FS)
|
|
int xe_configfs_init(void);
|
|
void xe_configfs_exit(void);
|
|
bool xe_configfs_get_survivability_mode(struct pci_dev *pdev);
|
|
void xe_configfs_clear_survivability_mode(struct pci_dev *pdev);
|
|
#else
|
|
static inline int xe_configfs_init(void) { return 0; };
|
|
static inline void xe_configfs_exit(void) {};
|
|
static inline bool xe_configfs_get_survivability_mode(struct pci_dev *pdev) { return false; };
|
|
static inline void xe_configfs_clear_survivability_mode(struct pci_dev *pdev) {};
|
|
#endif
|
|
|
|
#endif
|