priv.h (1669B)
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 10struct 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 21int nvkm_fault_new_(const struct nvkm_fault_func *, struct nvkm_device *, enum nvkm_subdev_type, 22 int inst, struct nvkm_fault **); 23 24struct 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 u64 (*pin)(struct nvkm_fault_buffer *); 34 void (*init)(struct nvkm_fault_buffer *); 35 void (*fini)(struct nvkm_fault_buffer *); 36 void (*intr)(struct nvkm_fault_buffer *, bool enable); 37 } buffer; 38 struct { 39 struct nvkm_sclass base; 40 int rp; 41 } user; 42}; 43 44void gp100_fault_buffer_intr(struct nvkm_fault_buffer *, bool enable); 45void gp100_fault_buffer_fini(struct nvkm_fault_buffer *); 46void gp100_fault_buffer_init(struct nvkm_fault_buffer *); 47u64 gp100_fault_buffer_pin(struct nvkm_fault_buffer *); 48void gp100_fault_buffer_info(struct nvkm_fault_buffer *); 49void gp100_fault_intr(struct nvkm_fault *); 50 51u64 gp10b_fault_buffer_pin(struct nvkm_fault_buffer *); 52 53int gv100_fault_oneinit(struct nvkm_fault *); 54 55int nvkm_ufault_new(struct nvkm_device *, const struct nvkm_oclass *, 56 void *, u32, struct nvkm_object **); 57#endif