diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c index c75689f2..1c3ba9c2 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | |||
@@ -24,6 +24,9 @@ | |||
24 | #include <linux/log2.h> | 24 | #include <linux/log2.h> |
25 | #include <trace/events/gk20a.h> | 25 | #include <trace/events/gk20a.h> |
26 | #include <uapi/linux/nvgpu.h> | 26 | #include <uapi/linux/nvgpu.h> |
27 | |||
28 | #include <nvgpu/kmem.h> | ||
29 | |||
27 | #include "ctxsw_trace_gk20a.h" | 30 | #include "ctxsw_trace_gk20a.h" |
28 | #include "gk20a.h" | 31 | #include "gk20a.h" |
29 | #include "gr_gk20a.h" | 32 | #include "gr_gk20a.h" |
@@ -196,7 +199,7 @@ static int gk20a_ctxsw_dev_ring_free(struct gk20a *g) | |||
196 | { | 199 | { |
197 | struct gk20a_ctxsw_dev *dev = &g->ctxsw_trace->devs[0]; | 200 | struct gk20a_ctxsw_dev *dev = &g->ctxsw_trace->devs[0]; |
198 | 201 | ||
199 | vfree(dev->hdr); | 202 | nvgpu_vfree(g, dev->hdr); |
200 | return 0; | 203 | return 0; |
201 | } | 204 | } |
202 | 205 | ||
@@ -516,7 +519,7 @@ int gk20a_ctxsw_trace_init(struct gk20a *g) | |||
516 | if (likely(trace)) | 519 | if (likely(trace)) |
517 | return 0; | 520 | return 0; |
518 | 521 | ||
519 | trace = kzalloc(sizeof(*trace), GFP_KERNEL); | 522 | trace = nvgpu_kzalloc(g, sizeof(*trace)); |
520 | if (unlikely(!trace)) | 523 | if (unlikely(!trace)) |
521 | return -ENOMEM; | 524 | return -ENOMEM; |
522 | g->ctxsw_trace = trace; | 525 | g->ctxsw_trace = trace; |
@@ -533,7 +536,7 @@ int gk20a_ctxsw_trace_init(struct gk20a *g) | |||
533 | 536 | ||
534 | fail: | 537 | fail: |
535 | memset(&g->ops.fecs_trace, 0, sizeof(g->ops.fecs_trace)); | 538 | memset(&g->ops.fecs_trace, 0, sizeof(g->ops.fecs_trace)); |
536 | kfree(trace); | 539 | nvgpu_kfree(g, trace); |
537 | g->ctxsw_trace = NULL; | 540 | g->ctxsw_trace = NULL; |
538 | return err; | 541 | return err; |
539 | #else | 542 | #else |
@@ -559,7 +562,7 @@ void gk20a_ctxsw_trace_cleanup(struct gk20a *g) | |||
559 | dev++; | 562 | dev++; |
560 | } | 563 | } |
561 | 564 | ||
562 | kfree(g->ctxsw_trace); | 565 | nvgpu_kfree(g, g->ctxsw_trace); |
563 | g->ctxsw_trace = NULL; | 566 | g->ctxsw_trace = NULL; |
564 | 567 | ||
565 | g->ops.fecs_trace.deinit(g); | 568 | g->ops.fecs_trace.deinit(g); |