[Intel-xe] [PATCH v3 2/3] drm/xe: Prefer WARN() over BUG() to avoid crashing the kernel

Vivi, Rodrigo rodrigo.vivi at intel.com
Tue Aug 1 14:39:48 UTC 2023


On Tue, 2023-08-01 at 17:01 +0300, Jani Nikula wrote:
> On Thu, 27 Jul 2023, Francois Dugast <francois.dugast at intel.com>
> wrote:
> > Replace calls to XE_BUG_ON() with calls XE_WARN_ON() which in turn
> > calls
> > WARN() instead of BUG(). BUG() crashes the kernel and should only
> > be
> > used when it is absolutely unavoidable in case of catastrophic and
> > unrecoverable failures, which is not the case here.
> > 
> > Signed-off-by: Francois Dugast <francois.dugast at intel.com>
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c |  2 +-
> 
> This seems to have been merged already, but it's really not helping
> us
> to touch i915 and xe in the same commits unless it's absolutely
> necessary. The i915 display part especially should've been a fixup
> patch
> to something else.

my bad sorry.
I totally forgot to pay attention to these cases...

> 
> 
> BR,
> Jani.
> 
> >  drivers/gpu/drm/xe/xe_bb.c                   |  8 +--
> >  drivers/gpu/drm/xe/xe_bo.c                   | 52 +++++++++-------
> > --
> >  drivers/gpu/drm/xe/xe_bo.h                   | 14 ++---
> >  drivers/gpu/drm/xe/xe_bo_evict.c             |  4 +-
> >  drivers/gpu/drm/xe/xe_execlist.c             | 14 ++---
> >  drivers/gpu/drm/xe/xe_force_wake.c           |  4 +-
> >  drivers/gpu/drm/xe/xe_force_wake.h           |  4 +-
> >  drivers/gpu/drm/xe/xe_ggtt.c                 | 12 ++---
> >  drivers/gpu/drm/xe/xe_gt_clock.c             |  4 +-
> >  drivers/gpu/drm/xe/xe_gt_debugfs.c           |  2 +-
> >  drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c  | 12 ++---
> >  drivers/gpu/drm/xe/xe_guc.c                  | 22 ++++----
> >  drivers/gpu/drm/xe/xe_guc_ads.c              | 14 ++---
> >  drivers/gpu/drm/xe/xe_guc_ct.c               | 22 ++++----
> >  drivers/gpu/drm/xe/xe_guc_hwconfig.c         |  2 +-
> >  drivers/gpu/drm/xe/xe_guc_log.c              |  4 +-
> >  drivers/gpu/drm/xe/xe_guc_submit.c           | 48 ++++++++--------
> > -
> >  drivers/gpu/drm/xe/xe_huc.c                  |  2 +-
> >  drivers/gpu/drm/xe/xe_hw_engine.c            | 10 ++--
> >  drivers/gpu/drm/xe/xe_hw_fence.c             |  2 +-
> >  drivers/gpu/drm/xe/xe_lrc.c                  |  8 +--
> >  drivers/gpu/drm/xe/xe_macros.h               |  1 -
> >  drivers/gpu/drm/xe/xe_migrate.c              | 34 ++++++------
> >  drivers/gpu/drm/xe/xe_pt.c                   | 22 ++++----
> >  drivers/gpu/drm/xe/xe_res_cursor.h           | 12 ++---
> >  drivers/gpu/drm/xe/xe_ring_ops.c             |  8 +--
> >  drivers/gpu/drm/xe/xe_sched_job.c            |  2 +-
> >  drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c       |  4 +-
> >  drivers/gpu/drm/xe/xe_uc_fw.c                | 16 +++---
> >  drivers/gpu/drm/xe/xe_uc_fw.h                |  2 +-
> >  drivers/gpu/drm/xe/xe_vm.c                   | 56 ++++++++++------
> > ----
> >  drivers/gpu/drm/xe/xe_wait_user_fence.c      |  2 +-
> >  drivers/gpu/drm/xe/xe_wopcm.c                | 18 +++----
> >  34 files changed, 221 insertions(+), 222 deletions(-)
> > 
> 



More information about the Intel-xe mailing list