mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
nouveau/vmm: increase size of vmm pte tracker struct to u32 (v2)
We need to tracker large counts of spte than previously due to unref getting delayed sometimes. This doesn't fix LPT tracking yet, it just creates space for it. Reviewed-by: Mary Guillemard <mary@mary.zone> Tested-by: Mary Guillemard <mary@mary.zone> Tested-by: Mel Henning <mhenning@darkrefraction.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260204030208.2313241-3-airlied@gmail.com
This commit is contained in:
parent
c4d53e567d
commit
9dc983a85e
|
|
@ -387,7 +387,7 @@ nvkm_vmm_sparse_ptes(const struct nvkm_vmm_desc *desc,
|
|||
} else
|
||||
if (desc->type == LPT) {
|
||||
union nvkm_pte_tracker sparse = { .s.sparse = 1 };
|
||||
memset(&pgt->pte[ptei].u, sparse.u, ptes);
|
||||
memset32(&pgt->pte[ptei].u, sparse.u, ptes);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ nvkm_vmm_sparse_unref_ptes(struct nvkm_vmm_iter *it, bool pfn, u32 ptei, u32 pte
|
|||
memset(&pt->pde[ptei], 0x00, sizeof(pt->pde[0]) * ptes);
|
||||
else
|
||||
if (it->desc->type == LPT)
|
||||
memset(&pt->pte[ptei].u, 0x00, sizeof(pt->pte[0]) * ptes);
|
||||
memset32(&pt->pte[ptei].u, 0x00, ptes);
|
||||
return nvkm_vmm_unref_ptes(it, pfn, ptei, ptes);
|
||||
}
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ nvkm_vmm_ref_hwpt(struct nvkm_vmm_iter *it, struct nvkm_vmm_pt *pgd, u32 pdei)
|
|||
desc->func->sparse(vmm, pt, pteb, ptes);
|
||||
else
|
||||
desc->func->invalid(vmm, pt, pteb, ptes);
|
||||
memset(&pgt->pte[pteb], 0x00, ptes);
|
||||
memset32(&pgt->pte[pteb].u, 0x00, ptes);
|
||||
} else {
|
||||
desc->func->unmap(vmm, pt, pteb, ptes);
|
||||
while (ptes--)
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@
|
|||
enum nvkm_memory_target;
|
||||
|
||||
union nvkm_pte_tracker {
|
||||
u8 u;
|
||||
u32 u;
|
||||
struct {
|
||||
u8 sparse:1;
|
||||
u8 spte_valid:1;
|
||||
u8 sptes:6;
|
||||
u32 sparse:1;
|
||||
u32 spte_valid:1;
|
||||
u32 padding:14;
|
||||
u32 sptes:16;
|
||||
} s;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user