mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-31 05:40:36 +00:00

Sometimes it's useful to load the driver with a smaller set of engines to allow more targeted debugging, particularly on early enabling. Besides checking what is fused off in hardware, add similar logic to disable engines in software. This will use configfs to allow users to set what engine to disable, so already add prepare for that. The exact configfs interface will be added later. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20250528-engine-mask-v4-3-f4636d2a890a@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
28 lines
868 B
C
28 lines
868 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2025 Intel Corporation
|
|
*/
|
|
#ifndef _XE_CONFIGFS_H_
|
|
#define _XE_CONFIGFS_H_
|
|
|
|
#include <linux/limits.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);
|
|
u64 xe_configfs_get_engines_allowed(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) { }
|
|
static inline u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev) { return U64_MAX; }
|
|
#endif
|
|
|
|
#endif
|