[PATCH v3 05/23] drm/xe/log: Add SIGID log helpers for severity
Michal Wajdeczko <[email protected]> Thu, 30 Jul 2026 17:21:01 +0200
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <[email protected]> |
There are only few CPER severity levels defined, add simple helper for each of them, to avoid forcing developers to write full severity name in every function call. Signed-off-by: Michal Wajdeczko <[email protected]> Cc: Rodrigo Vivi <[email protected]> --- v2: drop support for any_to_pdev (Michal) --- drivers/gpu/drm/xe/xe_log.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_log.h b/drivers/gpu/drm/xe/xe_log.h index d475e816ee0b..73daf37d6463 100644 --- a/drivers/gpu/drm/xe/xe_log.h +++ b/drivers/gpu/drm/xe/xe_log.h @@ -17,4 +17,20 @@ void xe_log_emit(struct pci_dev *pdev, int cper_sev, enum xe_sigid sigid, u32 component, u32 location, const void *data, size_t len, const char *fmt, ...); +#define xe_log_emit_fatal(pdev, sig, comp, loc, data, len, fmt, args...) \ + xe_log_emit((pdev), CPER_SEV_FATAL, (sig), (comp), (loc), \ + (data), (len), fmt, ##args) + +#define xe_log_emit_recoverable(pdev, sig, comp, loc, data, len, fmt, args...) \ + xe_log_emit((pdev), CPER_SEV_RECOVERABLE, (sig), (comp), (loc), \ + (data), (len), fmt, ##args) + +#define xe_log_emit_corrected(pdev, sig, comp, loc, data, len, fmt, args...) \ + xe_log_emit((pdev), CPER_SEV_CORRECTED, (sig), (comp), (loc), \ + (data), (len), fmt, ##args) + +#define xe_log_emit_info(pdev, sig, comp, loc, data, len, fmt, args...) \ + xe_log_emit((pdev), CPER_SEV_INFORMATIONAL, (sig), (comp), (loc), \ + (data), (len), fmt, ##args) + #endif -- 2.47.1