#include "xe_mmio.h"
#include "xe_tile.h"
+/**
+ * xe_mert_init_early() - Initialize MERT data
+ * @xe: the &xe_device with MERT to init
+ */
+void xe_mert_init_early(struct xe_device *xe)
+{
+ struct xe_tile *tile = xe_device_get_root_tile(xe);
+ struct xe_mert *mert = &tile->mert;
+
+ spin_lock_init(&mert->lock);
+ init_completion(&mert->tlb_inv_done);
+}
+
/**
* xe_mert_invalidate_lmtt() - Invalidate MERT LMTT
* @xe: the &xe_device with MERT
};
#ifdef CONFIG_PCI_IOV
+void xe_mert_init_early(struct xe_device *xe);
int xe_mert_invalidate_lmtt(struct xe_device *xe);
void xe_mert_irq_handler(struct xe_device *xe, u32 master_ctl);
#else
*/
int xe_sriov_pf_init_early(struct xe_device *xe)
{
- struct xe_mert *mert = &xe_device_get_root_tile(xe)->mert;
int err;
xe_assert(xe, IS_SRIOV_PF(xe));
xe_sriov_pf_service_init(xe);
- spin_lock_init(&mert->lock);
- init_completion(&mert->tlb_inv_done);
+ xe_mert_init_early(xe);
return 0;
}