1 #ifndef __NVKM_FAULT_PRIV_H__ 2 #define __NVKM_FAULT_PRIV_H__ 3 #define nvkm_fault_buffer(p) container_of((p), struct nvkm_fault_buffer, object) 4 #define nvkm_fault(p) container_of((p), struct nvkm_fault, subdev) 5 #include <subdev/fault.h> 6 7 #include <core/event.h> 8 #include <core/object.h> 9 10 struct nvkm_fault_buffer { 11 struct nvkm_object object; 12 struct nvkm_fault *fault; 13 int id; 14 int entries; 15 u32 get; 16 u32 put; 17 struct nvkm_memory *mem; 18 u64 addr; 19 }; 20 21 int nvkm_fault_new_(const struct nvkm_fault_func *, struct nvkm_device *, 22 int index, struct nvkm_fault **); 23 24 struct nvkm_fault_func { 25 int (*oneinit)(struct nvkm_fault *); 26 void (*init)(struct nvkm_fault *); 27 void (*fini)(struct nvkm_fault *); 28 void (*intr)(struct nvkm_fault *); 29 struct { 30 int nr; 31 u32 entry_size; 32 void (*info)(struct nvkm_fault_buffer *); 33 void (*init)(struct nvkm_fault_buffer *); 34 void (*fini)(struct nvkm_fault_buffer *); 35 void (*intr)(struct nvkm_fault_buffer *, bool enable); 36 } buffer; 37 struct { 38 struct nvkm_sclass base; 39 int rp; 40 } user; 41 }; 42 43 int gv100_fault_oneinit(struct nvkm_fault *); 44 45 int nvkm_ufault_new(struct nvkm_device *, const struct nvkm_oclass *, 46 void *, u32, struct nvkm_object **); 47 #endif 48