When xelp_pte_encode_addr() was added in commit
23c8495efeed
("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>
#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"
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;