1/* SPDX-License-Identifier: MIT */ 2/* 3 * Copyright �� 2023 Intel Corporation 4 */ 5 6#ifndef __INTEL_GUC_PRINT__ 7#define __INTEL_GUC_PRINT__ 8 9#include "gt/intel_gt.h" 10#include "gt/intel_gt_print.h" 11 12#define guc_printk(_guc, _level, _fmt, ...) \ 13 gt_##_level(guc_to_gt(_guc), "GUC: " _fmt, ##__VA_ARGS__) 14 15#define guc_err(_guc, _fmt, ...) \ 16 guc_printk((_guc), err, _fmt, ##__VA_ARGS__) 17 18#define guc_warn(_guc, _fmt, ...) \ 19 guc_printk((_guc), warn, _fmt, ##__VA_ARGS__) 20 21#define guc_notice(_guc, _fmt, ...) \ 22 guc_printk((_guc), notice, _fmt, ##__VA_ARGS__) 23 24#define guc_info(_guc, _fmt, ...) \ 25 guc_printk((_guc), info, _fmt, ##__VA_ARGS__) 26 27#define guc_dbg(_guc, _fmt, ...) \ 28 guc_printk((_guc), dbg, _fmt, ##__VA_ARGS__) 29 30#define guc_err_ratelimited(_guc, _fmt, ...) \ 31 guc_printk((_guc), err_ratelimited, _fmt, ##__VA_ARGS__) 32 33#define guc_notice_ratelimited(_guc, _fmt, ...) \ 34 guc_printk((_guc), notice_ratelimited, _fmt, ##__VA_ARGS__) 35 36#define guc_probe_error(_guc, _fmt, ...) \ 37 guc_printk((_guc), probe_error, _fmt, ##__VA_ARGS__) 38 39#define guc_WARN(_guc, _cond, _fmt, ...) \ 40 gt_WARN(guc_to_gt(_guc), _cond, "GUC: " _fmt, ##__VA_ARGS__) 41 42#define guc_WARN_ONCE(_guc, _cond, _fmt, ...) \ 43 gt_WARN_ONCE(guc_to_gt(_guc), _cond, "GUC: " _fmt, ##__VA_ARGS__) 44 45#define guc_WARN_ON(_guc, _cond) \ 46 gt_WARN(guc_to_gt(_guc), _cond, "%s(%s)", "guc_WARN_ON", __stringify(_cond)) 47 48#define guc_WARN_ON_ONCE(_guc, _cond) \ 49 gt_WARN_ONCE(guc_to_gt(_guc), _cond, "%s(%s)", "guc_WARN_ON_ONCE", __stringify(_cond)) 50 51#endif /* __INTEL_GUC_PRINT__ */ 52