From afa3007ca866ca3317493927163e09f993adc41b Mon Sep 17 00:00:00 2001 From: Michal Wajdeczko Date: Fri, 14 Aug 2026 19:17:31 +0200 Subject: [PATCH] drm/xe/log: Add SIGID log helpers for severity 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 Cc: Rodrigo Vivi Reviewed-by: Mallesh Koujalagi Link: https://patch.msgid.link/20260814171801.13347-6-michal.wajdeczko@intel.com Signed-off-by: Rodrigo Vivi --- 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