Lines Matching full:fault
29 struct nvkm_fault *fault = container_of(event, typeof(*fault), event); in nvkm_fault_ntfy_fini() local
30 fault->func->buffer.intr(fault->buffer[index], false); in nvkm_fault_ntfy_fini()
36 struct nvkm_fault *fault = container_of(event, typeof(*fault), event); in nvkm_fault_ntfy_init() local
37 fault->func->buffer.intr(fault->buffer[index], true); in nvkm_fault_ntfy_init()
49 struct nvkm_fault *fault = nvkm_fault(subdev); in nvkm_fault_intr() local
50 return fault->func->intr(fault); in nvkm_fault_intr()
56 struct nvkm_fault *fault = nvkm_fault(subdev); in nvkm_fault_fini() local
57 if (fault->func->fini) in nvkm_fault_fini()
58 fault->func->fini(fault); in nvkm_fault_fini()
65 struct nvkm_fault *fault = nvkm_fault(subdev); in nvkm_fault_init() local
66 if (fault->func->init) in nvkm_fault_init()
67 fault->func->init(fault); in nvkm_fault_init()
72 nvkm_fault_oneinit_buffer(struct nvkm_fault *fault, int id) in nvkm_fault_oneinit_buffer() argument
74 struct nvkm_subdev *subdev = &fault->subdev; in nvkm_fault_oneinit_buffer()
81 buffer->fault = fault; in nvkm_fault_oneinit_buffer()
83 fault->func->buffer.info(buffer); in nvkm_fault_oneinit_buffer()
84 fault->buffer[id] = buffer; in nvkm_fault_oneinit_buffer()
89 fault->func->buffer.entry_size, 0x1000, true, in nvkm_fault_oneinit_buffer()
94 /* Pin fault buffer in BAR2. */ in nvkm_fault_oneinit_buffer()
95 buffer->addr = fault->func->buffer.pin(buffer); in nvkm_fault_oneinit_buffer()
105 struct nvkm_fault *fault = nvkm_fault(subdev); in nvkm_fault_oneinit() local
108 for (i = 0; i < ARRAY_SIZE(fault->buffer); i++) { in nvkm_fault_oneinit()
109 if (i < fault->func->buffer.nr) { in nvkm_fault_oneinit()
110 ret = nvkm_fault_oneinit_buffer(fault, i); in nvkm_fault_oneinit()
113 fault->buffer_nr = i + 1; in nvkm_fault_oneinit()
117 ret = nvkm_event_init(&nvkm_fault_ntfy, subdev, 1, fault->buffer_nr, &fault->event); in nvkm_fault_oneinit()
121 if (fault->func->oneinit) in nvkm_fault_oneinit()
122 ret = fault->func->oneinit(fault); in nvkm_fault_oneinit()
129 struct nvkm_fault *fault = nvkm_fault(subdev); in nvkm_fault_dtor() local
132 nvkm_event_ntfy_del(&fault->nrpfb); in nvkm_fault_dtor()
133 nvkm_event_fini(&fault->event); in nvkm_fault_dtor()
135 for (i = 0; i < fault->buffer_nr; i++) { in nvkm_fault_dtor()
136 if (fault->buffer[i]) { in nvkm_fault_dtor()
137 nvkm_memory_unref(&fault->buffer[i]->mem); in nvkm_fault_dtor()
138 kfree(fault->buffer[i]); in nvkm_fault_dtor()
142 return fault; in nvkm_fault_dtor()
158 struct nvkm_fault *fault; in nvkm_fault_new_() local
159 if (!(fault = *pfault = kzalloc(sizeof(*fault), GFP_KERNEL))) in nvkm_fault_new_()
161 nvkm_subdev_ctor(&nvkm_fault, device, type, inst, &fault->subdev); in nvkm_fault_new_()
162 fault->func = func; in nvkm_fault_new_()
163 fault->user.ctor = nvkm_ufault_new; in nvkm_fault_new_()
164 fault->user.base = func->user.base; in nvkm_fault_new_()