[Intel-xe] [PATCH] drm/xe: Remove unused xe_gt_WARN* macros
Michal Wajdeczko
michal.wajdeczko at intel.com
Wed Jul 26 17:48:09 UTC 2023
On 26.07.2023 17:40, Francois Dugast wrote:
> Those specific macros are not used, removing them to prevent using
> another flavor of WARN().
maybe instead of removing them we should rather convert other places,
which are using less useful generic WARN, even if they are GT related:
./xe_guc_ads.c:320: XE_WARN_ON(ads->golden_lrc_size +
./xe_guc_submit.c:709: XE_WARN_ON("Pending enable failed to
respond");
./xe_guc_submit.c:793: XE_WARN_ON(!xe_engine_is_lr(e));
./xe_guc_submit.c:815: XE_WARN_ON("Schedule disable
failed to respond");
./xe_guc_submit.c:837: XE_WARN_ON(e->flags & ENGINE_FLAG_KERNEL);
./xe_guc_submit.c:838: XE_WARN_ON(e->flags & ENGINE_FLAG_VM &&
!engine_killed(e));
./xe_guc_submit.c:891: XE_WARN_ON("Schedule disable
failed to respond");
./xe_guc_submit.c:1174: XE_WARN_ON(e->class);
./xe_ggtt.c:246: XE_WARN_ON(seqno <= 0);
./xe_ggtt.c:379: XE_WARN_ON(err);
./xe_ggtt.c:460: if (XE_WARN_ON(bo->ggtt_node.size)) {
./xe_ggtt.c:510: if (XE_WARN_ON(!bo->ggtt_node.size))
./xe_gt.c:341: XE_WARN_ON(err);
./xe_gt.c:417: XE_WARN_ON(err);
./xe_gt.c:586: XE_WARN_ON(err);
./xe_gt.c:593: XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt),
XE_FORCEWAKE_ALL));
./xe_gt.c:595: XE_WARN_ON(xe_uc_start(>->uc));
./xe_gt.c:624: XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt),
XE_FORCEWAKE_ALL));
./xe_gt.c:628: XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt),
XE_FORCEWAKE_ALL));
./xe_gt.c:651: XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt),
XE_FORCEWAKE_ALL));
./xe_gt.c:658: XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt),
XE_FORCEWAKE_ALL));
./xe_gt.c:679: XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt),
XE_FORCEWAKE_ALL));
./xe_gt.c:686: XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt),
XE_FORCEWAKE_ALL));
./xe_gt_topology.c:24: if (drm_WARN_ON(>_to_xe(gt)->drm, numregs >
XE_MAX_DSS_FUSE_REGS))
./xe_gt_topology.c:93: drm_WARN_ON(&xe->drm, num_geometry_regs > 1);
./xe_gt_topology.c:94: drm_WARN_ON(&xe->drm, num_compute_regs > 2);
./xe_guc.c:869: XE_WARN_ON(xe_guc_pc_stop(&guc->pc));
./xe_guc.c:894: XE_WARN_ON(ret);
./xe_gt_mcr.c:297: drm_WARN_ON(&xe->drm, MEDIA_VER(xe) < 13);
./xe_gt_mcr.c:399: drm_WARN(>_to_xe(gt)->drm, true,
./xe_gt_mcr.c:429: drm_WARN_ON_ONCE(&xe->drm, ret == -ETIMEDOUT);
also note that there is some in flight code that is relying on these
macros (as GT oriented messages are proved to be helpful in development
and maintenance)
Michal
>
> Signed-off-by: Francois Dugast <francois.dugast at intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_printk.h | 15 ---------------
> 1 file changed, 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_printk.h b/drivers/gpu/drm/xe/xe_gt_printk.h
> index 5991bcadd47e..95aa7173fbb2 100644
> --- a/drivers/gpu/drm/xe/xe_gt_printk.h
> +++ b/drivers/gpu/drm/xe/xe_gt_printk.h
> @@ -16,9 +16,6 @@
> #define xe_gt_err(_gt, _fmt, ...) \
> xe_gt_printk((_gt), err, _fmt, ##__VA_ARGS__)
>
> -#define xe_gt_warn(_gt, _fmt, ...) \
> - xe_gt_printk((_gt), warn, _fmt, ##__VA_ARGS__)
> -
> #define xe_gt_notice(_gt, _fmt, ...) \
> xe_gt_printk((_gt), notice, _fmt, ##__VA_ARGS__)
>
> @@ -31,16 +28,4 @@
> #define xe_gt_err_ratelimited(_gt, _fmt, ...) \
> xe_gt_printk((_gt), err_ratelimited, _fmt, ##__VA_ARGS__)
>
> -#define xe_gt_WARN(_gt, _condition, _fmt, ...) \
> - drm_WARN(>_to_xe(_gt)->drm, _condition, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)
> -
> -#define xe_gt_WARN_ONCE(_gt, _condition, _fmt, ...) \
> - drm_WARN_ONCE(>_to_xe(_gt)->drm, _condition, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)
> -
> -#define xe_gt_WARN_ON(_gt, _condition) \
> - xe_gt_WARN((_gt), _condition, "%s(%s)", "gt_WARN_ON", __stringify(_condition))
> -
> -#define xe_gt_WARN_ON_ONCE(_gt, _condition) \
> - xe_gt_WARN_ONCE((_gt), _condition, "%s(%s)", "gt_WARN_ON_ONCE", __stringify(_condition))
> -
> #endif
More information about the Intel-xe
mailing list