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>
7 #include <core/event.h>
8 #include <core/object.h>
10 struct nvkm_fault_buffer
{
11 struct nvkm_object object
;
12 struct nvkm_fault
*fault
;
17 struct nvkm_memory
*mem
;
21 int nvkm_fault_new_(const struct nvkm_fault_func
*, struct nvkm_device
*,
22 int index
, struct nvkm_fault
**);
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
*);
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
);
39 struct nvkm_sclass base
;
44 void gp100_fault_buffer_intr(struct nvkm_fault_buffer
*, bool enable
);
45 void gp100_fault_buffer_fini(struct nvkm_fault_buffer
*);
46 void gp100_fault_buffer_init(struct nvkm_fault_buffer
*);
47 u64
gp100_fault_buffer_pin(struct nvkm_fault_buffer
*);
48 void gp100_fault_buffer_info(struct nvkm_fault_buffer
*);
49 void gp100_fault_intr(struct nvkm_fault
*);
51 u64
gp10b_fault_buffer_pin(struct nvkm_fault_buffer
*);
53 int gv100_fault_oneinit(struct nvkm_fault
*);
55 int nvkm_ufault_new(struct nvkm_device
*, const struct nvkm_oclass
*,
56 void *, u32
, struct nvkm_object
**);