Lines Matching +full:mem +full:- +full:base

34 	struct nvkm_fault_buffer *buffer = fault->buffer[0];  in gv100_fault_buffer_process()
35 struct nvkm_device *device = fault->subdev.device; in gv100_fault_buffer_process()
36 struct nvkm_memory *mem = buffer->mem; in gv100_fault_buffer_process() local
37 u32 get = nvkm_rd32(device, buffer->get); in gv100_fault_buffer_process()
38 u32 put = nvkm_rd32(device, buffer->put); in gv100_fault_buffer_process()
42 nvkm_kmap(mem); in gv100_fault_buffer_process()
44 const u32 base = get * buffer->fault->func->buffer.entry_size; in gv100_fault_buffer_process() local
45 const u32 instlo = nvkm_ro32(mem, base + 0x00); in gv100_fault_buffer_process()
46 const u32 insthi = nvkm_ro32(mem, base + 0x04); in gv100_fault_buffer_process()
47 const u32 addrlo = nvkm_ro32(mem, base + 0x08); in gv100_fault_buffer_process()
48 const u32 addrhi = nvkm_ro32(mem, base + 0x0c); in gv100_fault_buffer_process()
49 const u32 timelo = nvkm_ro32(mem, base + 0x10); in gv100_fault_buffer_process()
50 const u32 timehi = nvkm_ro32(mem, base + 0x14); in gv100_fault_buffer_process()
51 const u32 info0 = nvkm_ro32(mem, base + 0x18); in gv100_fault_buffer_process()
52 const u32 info1 = nvkm_ro32(mem, base + 0x1c); in gv100_fault_buffer_process()
55 if (++get == buffer->entries) in gv100_fault_buffer_process()
57 nvkm_wr32(device, buffer->get, get); in gv100_fault_buffer_process()
70 nvkm_fifo_fault(device->fifo, &info); in gv100_fault_buffer_process()
72 nvkm_done(mem); in gv100_fault_buffer_process()
78 struct nvkm_device *device = buffer->fault->subdev.device; in gv100_fault_buffer_intr()
79 const u32 intr = buffer->id ? 0x08000000 : 0x20000000; in gv100_fault_buffer_intr()
89 struct nvkm_device *device = buffer->fault->subdev.device; in gv100_fault_buffer_fini()
90 const u32 foff = buffer->id * 0x14; in gv100_fault_buffer_fini()
97 struct nvkm_device *device = buffer->fault->subdev.device; in gv100_fault_buffer_init()
98 const u32 foff = buffer->id * 0x14; in gv100_fault_buffer_init()
101 nvkm_wr32(device, 0x100e28 + foff, upper_32_bits(buffer->addr)); in gv100_fault_buffer_init()
102 nvkm_wr32(device, 0x100e24 + foff, lower_32_bits(buffer->addr)); in gv100_fault_buffer_init()
109 struct nvkm_device *device = buffer->fault->subdev.device; in gv100_fault_buffer_info()
110 const u32 foff = buffer->id * 0x14; in gv100_fault_buffer_info()
114 buffer->entries = nvkm_rd32(device, 0x100e34 + foff) & 0x000fffff; in gv100_fault_buffer_info()
115 buffer->get = 0x100e2c + foff; in gv100_fault_buffer_info()
116 buffer->put = 0x100e30 + foff; in gv100_fault_buffer_info()
124 schedule_work(&fault->nrpfb_work); in gv100_fault_ntfy_nrpfb()
131 struct nvkm_subdev *subdev = &fault->subdev; in gv100_fault_intr_fault()
132 struct nvkm_device *device = subdev->device; in gv100_fault_intr_fault()
151 nvkm_fifo_fault(device->fifo, &info); in gv100_fault_intr_fault()
157 struct nvkm_subdev *subdev = &fault->subdev; in gv100_fault_intr()
158 struct nvkm_device *device = subdev->device; in gv100_fault_intr()
168 if (fault->buffer[0]) { in gv100_fault_intr()
169 nvkm_event_ntfy(&fault->event, 0, NVKM_FAULT_BUFFER_EVENT_PENDING); in gv100_fault_intr()
175 if (fault->buffer[1]) { in gv100_fault_intr()
176 nvkm_event_ntfy(&fault->event, 1, NVKM_FAULT_BUFFER_EVENT_PENDING); in gv100_fault_intr()
189 nvkm_event_ntfy_block(&fault->nrpfb); in gv100_fault_fini()
190 flush_work(&fault->nrpfb_work); in gv100_fault_fini()
192 if (fault->buffer[0]) in gv100_fault_fini()
193 fault->func->buffer.fini(fault->buffer[0]); in gv100_fault_fini()
195 nvkm_mask(fault->subdev.device, 0x100a34, 0x80000000, 0x80000000); in gv100_fault_fini()
201 nvkm_mask(fault->subdev.device, 0x100a2c, 0x80000000, 0x80000000); in gv100_fault_init()
202 fault->func->buffer.init(fault->buffer[0]); in gv100_fault_init()
203 nvkm_event_ntfy_allow(&fault->nrpfb); in gv100_fault_init()
209 nvkm_event_ntfy_add(&fault->event, 0, NVKM_FAULT_BUFFER_EVENT_PENDING, true, in gv100_fault_oneinit()
210 gv100_fault_ntfy_nrpfb, &fault->nrpfb); in gv100_fault_oneinit()
227 /*TODO: Figure out how to expose non-replayable fault buffer, which,
231 * the non-replayable fault buffer.
244 INIT_WORK(&(*pfault)->nrpfb_work, gv100_fault_buffer_process); in gv100_fault_new()