summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/boardobj/boardobjgrp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/boardobj/boardobjgrp.h')
-rw-r--r--drivers/gpu/nvgpu/boardobj/boardobjgrp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/boardobj/boardobjgrp.h b/drivers/gpu/nvgpu/boardobj/boardobjgrp.h
index 14d7c1bb..32e92ae0 100644
--- a/drivers/gpu/nvgpu/boardobj/boardobjgrp.h
+++ b/drivers/gpu/nvgpu/boardobj/boardobjgrp.h
@@ -199,6 +199,7 @@ struct boardobjgrp {
199 199
200 boardobjgrp_pmudatainstget *pmudatainstget; 200 boardobjgrp_pmudatainstget *pmudatainstget;
201 boardobjgrp_pmustatusinstget *pmustatusinstget; 201 boardobjgrp_pmustatusinstget *pmustatusinstget;
202 struct nvgpu_list_node node;
202}; 203};
203 204
204/* 205/*
@@ -404,4 +405,12 @@ void boardobjgrpe32hdrset(struct nv_pmu_boardobjgrp *hdr, u32 objmask);
404 idx += 1; \ 405 idx += 1; \
405 (n32) = idx; \ 406 (n32) = idx; \
406} 407}
408
409static inline struct boardobjgrp *
410boardobjgrp_from_node(struct nvgpu_list_node *node)
411{
412 return (struct boardobjgrp *)
413 ((uintptr_t)node - offsetof(struct boardobjgrp, node));
414};
415
407#endif 416#endif