This source file includes following definitions.
- gk104_vmm_lpt_invalid
- gk104_vmm_new
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "vmm.h"
23
24 void
25 gk104_vmm_lpt_invalid(struct nvkm_vmm *vmm,
26 struct nvkm_mmu_pt *pt, u32 ptei, u32 ptes)
27 {
28
29 VMM_FO064(pt, vmm, ptei * 8, BIT_ULL(1) , ptes);
30 }
31
32 static const struct nvkm_vmm_desc_func
33 gk104_vmm_lpt = {
34 .invalid = gk104_vmm_lpt_invalid,
35 .unmap = gf100_vmm_pgt_unmap,
36 .mem = gf100_vmm_pgt_mem,
37 };
38
39 const struct nvkm_vmm_desc
40 gk104_vmm_desc_17_12[] = {
41 { SPT, 15, 8, 0x1000, &gf100_vmm_pgt },
42 { PGD, 13, 8, 0x1000, &gf100_vmm_pgd },
43 {}
44 };
45
46 const struct nvkm_vmm_desc
47 gk104_vmm_desc_17_17[] = {
48 { LPT, 10, 8, 0x1000, &gk104_vmm_lpt },
49 { PGD, 13, 8, 0x1000, &gf100_vmm_pgd },
50 {}
51 };
52
53 const struct nvkm_vmm_desc
54 gk104_vmm_desc_16_12[] = {
55 { SPT, 14, 8, 0x1000, &gf100_vmm_pgt },
56 { PGD, 14, 8, 0x1000, &gf100_vmm_pgd },
57 {}
58 };
59
60 const struct nvkm_vmm_desc
61 gk104_vmm_desc_16_16[] = {
62 { LPT, 10, 8, 0x1000, &gk104_vmm_lpt },
63 { PGD, 14, 8, 0x1000, &gf100_vmm_pgd },
64 {}
65 };
66
67 static const struct nvkm_vmm_func
68 gk104_vmm_17 = {
69 .join = gf100_vmm_join,
70 .part = gf100_vmm_part,
71 .aper = gf100_vmm_aper,
72 .valid = gf100_vmm_valid,
73 .flush = gf100_vmm_flush,
74 .invalidate_pdb = gf100_vmm_invalidate_pdb,
75 .page = {
76 { 17, &gk104_vmm_desc_17_17[0], NVKM_VMM_PAGE_xVxC },
77 { 12, &gk104_vmm_desc_17_12[0], NVKM_VMM_PAGE_xVHx },
78 {}
79 }
80 };
81
82 static const struct nvkm_vmm_func
83 gk104_vmm_16 = {
84 .join = gf100_vmm_join,
85 .part = gf100_vmm_part,
86 .aper = gf100_vmm_aper,
87 .valid = gf100_vmm_valid,
88 .flush = gf100_vmm_flush,
89 .invalidate_pdb = gf100_vmm_invalidate_pdb,
90 .page = {
91 { 16, &gk104_vmm_desc_16_16[0], NVKM_VMM_PAGE_xVxC },
92 { 12, &gk104_vmm_desc_16_12[0], NVKM_VMM_PAGE_xVHx },
93 {}
94 }
95 };
96
97 int
98 gk104_vmm_new(struct nvkm_mmu *mmu, bool managed, u64 addr, u64 size,
99 void *argv, u32 argc, struct lock_class_key *key,
100 const char *name, struct nvkm_vmm **pvmm)
101 {
102 return gf100_vmm_new_(&gk104_vmm_16, &gk104_vmm_17, mmu, managed, addr,
103 size, argv, argc, key, name, pvmm);
104 }