|
@@ -545,6 +545,12 @@ static void mmio_invalidate(struct npu_context *npu_context, int va,
|
|
struct mmio_atsd_reg mmio_atsd_reg[NV_MAX_NPUS];
|
|
struct mmio_atsd_reg mmio_atsd_reg[NV_MAX_NPUS];
|
|
unsigned long pid = npu_context->mm->context.id;
|
|
unsigned long pid = npu_context->mm->context.id;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Unfortunately the nest mmu does not support flushing specific
|
|
|
|
+ * addresses so we have to flush the whole mm.
|
|
|
|
+ */
|
|
|
|
+ flush_tlb_mm(npu_context->mm);
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Loop over all the NPUs this process is active on and launch
|
|
* Loop over all the NPUs this process is active on and launch
|
|
* an invalidate.
|
|
* an invalidate.
|
|
@@ -576,12 +582,6 @@ static void mmio_invalidate(struct npu_context *npu_context, int va,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- /*
|
|
|
|
- * Unfortunately the nest mmu does not support flushing specific
|
|
|
|
- * addresses so we have to flush the whole mm.
|
|
|
|
- */
|
|
|
|
- flush_tlb_mm(npu_context->mm);
|
|
|
|
-
|
|
|
|
mmio_invalidate_wait(mmio_atsd_reg, flush);
|
|
mmio_invalidate_wait(mmio_atsd_reg, flush);
|
|
if (flush)
|
|
if (flush)
|
|
/* Wait for the flush to complete */
|
|
/* Wait for the flush to complete */
|