Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023-2025 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_SRIOV_PRINTK_H_
|
|
#define _XE_SRIOV_PRINTK_H_
|
|
|
|
#include "xe_printk.h"
|
|
|
|
#define xe_sriov_printk_prefix(xe) \
|
|
((xe)->sriov.__mode == XE_SRIOV_MODE_PF ? "PF: " : \
|
|
(xe)->sriov.__mode == XE_SRIOV_MODE_VF ? "VF: " : "")
|
|
|
|
#define __XE_SRIOV_PRINTK_FMT(_xe, _fmt, _args...) \
|
|
"%s" _fmt, xe_sriov_printk_prefix(_xe), ##_args
|
|
|
|
#define xe_sriov_printk(xe, _level, fmt, ...) \
|
|
xe_##_level((xe), __XE_SRIOV_PRINTK_FMT((xe), fmt, ##__VA_ARGS__))
|
|
|
|
#define xe_sriov_err(xe, fmt, ...) \
|
|
xe_sriov_printk((xe), err, fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_sriov_err_ratelimited(xe, fmt, ...) \
|
|
xe_sriov_printk((xe), err_ratelimited, fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_sriov_warn(xe, fmt, ...) \
|
|
xe_sriov_printk((xe), warn, fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_sriov_notice(xe, fmt, ...) \
|
|
xe_sriov_printk((xe), notice, fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_sriov_info(xe, fmt, ...) \
|
|
xe_sriov_printk((xe), info, fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_sriov_dbg(xe, fmt, ...) \
|
|
xe_sriov_printk((xe), dbg, fmt, ##__VA_ARGS__)
|
|
|
|
/* for low level noisy debug messages */
|
|
#ifdef CONFIG_DRM_XE_DEBUG_SRIOV
|
|
#define xe_sriov_dbg_verbose(xe, fmt, ...) xe_sriov_dbg(xe, fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define xe_sriov_dbg_verbose(xe, fmt, ...) typecheck(struct xe_device *, (xe))
|
|
#endif
|
|
|
|
#endif
|