1 #ifndef __NVKM_FAULT_H__ 2 #define __NVKM_FAULT_H__ 3 #include <core/subdev.h> 4 #include <core/event.h> 5 6 struct nvkm_fault { 7 const struct nvkm_fault_func *func; 8 struct nvkm_subdev subdev; 9 10 struct nvkm_inth info_fault; 11 12 struct nvkm_fault_buffer *buffer[2]; 13 int buffer_nr; 14 15 #define NVKM_FAULT_BUFFER_EVENT_PENDING BIT(0) 16 struct nvkm_event event; 17 18 struct nvkm_event_ntfy nrpfb; 19 struct work_struct nrpfb_work; 20 21 struct nvkm_device_oclass user; 22 }; 23 24 struct nvkm_fault_data { 25 u64 addr; 26 u64 inst; 27 u64 time; 28 u8 engine; 29 u8 valid; 30 u8 gpc; 31 u8 hub; 32 u8 access; 33 u8 client; 34 u8 reason; 35 }; 36 37 int gp100_fault_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fault **); 38 int gp10b_fault_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fault **); 39 int gv100_fault_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fault **); 40 int tu102_fault_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fault **); 41 #endif 42