From 94feb18de8a687bef7c94999161b6bebaa382709 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Thu, 26 Oct 2017 16:41:24 -0700 Subject: gpu: nvgpu: call destructor for boardobj and boardobjgrp Maintain a list of boardobj and boardobjgrp, so that we can free related objects when removing pmu support. A flag is added in boardobj so that the destructor can determine if it should free the object. This 'allocated' flag is false when the object is embedded into another structure, which should be freed through other means. JIRA EVLR-1959 Bug 200352099 Change-Id: I6a3ff3c57f7428dd145deacf98f2992a9be9796d Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/1586596 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 5b22d1a4..365c7252 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1295,6 +1295,9 @@ struct gk20a { u32 syncpt_size; #endif struct nvgpu_mem syncpt_mem; + + struct nvgpu_list_node boardobj_head; + struct nvgpu_list_node boardobjgrp_head; }; static inline unsigned long gk20a_get_gr_idle_timeout(struct gk20a *g) -- cgit v1.2.2