summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_bo_evict.c
diff options
context:
space:
mode:
authorFrancois Dugast <francois.dugast@intel.com>2023-07-27 14:55:29 +0000
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 11:39:17 -0500
commit99fea6828879381405dba598627aea79fa6edd78 (patch)
tree1ae501df46eb3a5274eec4f4a5006eae1ddf08b9 /drivers/gpu/drm/xe/xe_bo_evict.c
parent3207a32163cdf7b3345a44e255aae614859ea0d6 (diff)
drm/xe: Prefer WARN() over BUG() to avoid crashing the kernel
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@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo_evict.c')
-rw-r--r--drivers/gpu/drm/xe/xe_bo_evict.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo_evict.c b/drivers/gpu/drm/xe/xe_bo_evict.c
index f559a7f3eb3e..0d5c3a208ab4 100644
--- a/drivers/gpu/drm/xe/xe_bo_evict.c
+++ b/drivers/gpu/drm/xe/xe_bo_evict.c
@@ -160,8 +160,8 @@ int xe_bo_restore_kernel(struct xe_device *xe)
* We expect validate to trigger a move VRAM and our move code
* should setup the iosys map.
*/
- XE_BUG_ON(iosys_map_is_null(&bo->vmap));
- XE_BUG_ON(!xe_bo_is_vram(bo));
+ XE_WARN_ON(iosys_map_is_null(&bo->vmap));
+ XE_WARN_ON(!xe_bo_is_vram(bo));
xe_bo_put(bo);