mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-14 15:15:36 -04:00
drm/xe/vm: Prefer xe_assert() over XE_WARN_ON()
When xelp_pte_encode_addr() was added in commit 23c8495efe
("drm/xe/migrate: Do not hand-encode pte"), there was no xe pointer for
using xe_assert(). This is not the case anymore, so prefer it over
XE_WARN_ON().
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
committed by
Rodrigo Vivi
parent
f8ebadd0df
commit
285230832e
@@ -17,6 +17,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/swap.h>
|
||||
|
||||
#include "xe_assert.h"
|
||||
#include "xe_bo.h"
|
||||
#include "xe_device.h"
|
||||
#include "xe_drm_client.h"
|
||||
@@ -1312,7 +1313,7 @@ static u64 xelp_pte_encode_addr(struct xe_device *xe, u64 addr,
|
||||
u64 pte;
|
||||
|
||||
/* Avoid passing random bits directly as flags */
|
||||
XE_WARN_ON(flags & ~XE_PTE_PS64);
|
||||
xe_assert(xe, !(flags & ~XE_PTE_PS64));
|
||||
|
||||
pte = addr;
|
||||
pte |= XE_PAGE_PRESENT | XE_PAGE_RW;
|
||||
|
||||
Reference in New Issue
Block a user