diff options
author | Alex Waterman <alexw@nvidia.com> | 2016-09-21 17:24:59 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-26 14:10:01 -0400 |
commit | 2fa54c94a67e13d84df980d646674dde0ad27168 (patch) | |
tree | 2bf49a012542caa2ad278392b313305f74fe96f6 /drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c | |
parent | 93eea1d72934b28db4707e5aa7ab4dab65d89551 (diff) |
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 <alexw@nvidia.com>
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 <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c index a8a031be..3715e9f8 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator_buddy.c | |||
@@ -1218,7 +1218,7 @@ static const struct gk20a_allocator_ops buddy_ops = { | |||
1218 | * will try and pick a reasonable max order. | 1218 | * will try and pick a reasonable max order. |
1219 | * @flags: Extra flags necessary. See GPU_BALLOC_*. | 1219 | * @flags: Extra flags necessary. See GPU_BALLOC_*. |
1220 | */ | 1220 | */ |
1221 | int __gk20a_buddy_allocator_init(struct gk20a_allocator *__a, | 1221 | int __gk20a_buddy_allocator_init(struct gk20a *g, struct gk20a_allocator *__a, |
1222 | struct vm_gk20a *vm, const char *name, | 1222 | struct vm_gk20a *vm, const char *name, |
1223 | u64 base, u64 size, u64 blk_size, | 1223 | u64 base, u64 size, u64 blk_size, |
1224 | u64 max_order, u64 flags) | 1224 | u64 max_order, u64 flags) |
@@ -1303,7 +1303,7 @@ int __gk20a_buddy_allocator_init(struct gk20a_allocator *__a, | |||
1303 | wmb(); | 1303 | wmb(); |
1304 | a->initialized = 1; | 1304 | a->initialized = 1; |
1305 | 1305 | ||
1306 | gk20a_init_alloc_debug(__a); | 1306 | gk20a_init_alloc_debug(g, __a); |
1307 | alloc_dbg(__a, "New allocator: type buddy\n"); | 1307 | alloc_dbg(__a, "New allocator: type buddy\n"); |
1308 | alloc_dbg(__a, " base 0x%llx\n", a->base); | 1308 | alloc_dbg(__a, " base 0x%llx\n", a->base); |
1309 | alloc_dbg(__a, " size 0x%llx\n", a->length); | 1309 | alloc_dbg(__a, " size 0x%llx\n", a->length); |
@@ -1318,9 +1318,10 @@ fail: | |||
1318 | return err; | 1318 | return err; |
1319 | } | 1319 | } |
1320 | 1320 | ||
1321 | int gk20a_buddy_allocator_init(struct gk20a_allocator *a, const char *name, | 1321 | int gk20a_buddy_allocator_init(struct gk20a *g, struct gk20a_allocator *a, |
1322 | u64 base, u64 size, u64 blk_size, u64 flags) | 1322 | const char *name, u64 base, u64 size, |
1323 | u64 blk_size, u64 flags) | ||
1323 | { | 1324 | { |
1324 | return __gk20a_buddy_allocator_init(a, NULL, name, | 1325 | return __gk20a_buddy_allocator_init(g, a, NULL, name, |
1325 | base, size, blk_size, 0, 0); | 1326 | base, size, blk_size, 0, 0); |
1326 | } | 1327 | } |