From 2fa54c94a67e13d84df980d646674dde0ad27168 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 21 Sep 2016 14:24:59 -0700 Subject: gpu: nvgpu: Remove global debugfs variable Remove a global debugfs variable and instead save the allocator debugfs root node in the gk20a struct. Bug 1799159 Change-Id: If4eed34fa24775e962001e34840b334658f2321c Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1225611 (cherry picked from commit 1908fde10bb1fb60ce898ea329f5a441a3e4297a) Reviewed-on: http://git-master/r/1242390 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c index 94d30abf..f670fd98 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_page.c @@ -866,9 +866,9 @@ static int gk20a_page_alloc_init_slabs(struct gk20a_page_allocator *a) return 0; } -int gk20a_page_allocator_init(struct gk20a_allocator *__a, - const char *name, u64 base, u64 length, - u64 blk_size, u64 flags) +int gk20a_page_allocator_init(struct gk20a *g, struct gk20a_allocator *__a, + const char *name, u64 base, u64 length, + u64 blk_size, u64 flags) { struct gk20a_page_allocator *a; char buddy_name[sizeof(__a->name)]; @@ -914,12 +914,12 @@ int gk20a_page_allocator_init(struct gk20a_allocator *__a, snprintf(buddy_name, sizeof(buddy_name), "%s-src", name); - err = gk20a_buddy_allocator_init(&a->source_allocator, buddy_name, base, - length, blk_size, 0); + err = gk20a_buddy_allocator_init(g, &a->source_allocator, buddy_name, + base, length, blk_size, 0); if (err) goto fail; - gk20a_init_alloc_debug(__a); + gk20a_init_alloc_debug(g, __a); palloc_dbg(a, "New allocator: type page\n"); palloc_dbg(a, " base 0x%llx\n", a->base); palloc_dbg(a, " size 0x%llx\n", a->length); -- cgit v1.2.2