summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2016-09-21 17:24:59 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-26 14:10:01 -0400
commit2fa54c94a67e13d84df980d646674dde0ad27168 (patch)
tree2bf49a012542caa2ad278392b313305f74fe96f6 /drivers/gpu/nvgpu/gk20a/gk20a_allocator.h
parent93eea1d72934b28db4707e5aa7ab4dab65d89551 (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.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_allocator.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h
index dc065ffa..b12926b3 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.h
@@ -26,6 +26,7 @@
26struct gk20a_allocator; 26struct gk20a_allocator;
27struct gk20a_alloc_carveout; 27struct gk20a_alloc_carveout;
28struct vm_gk20a; 28struct vm_gk20a;
29struct gk20a;
29 30
30/* 31/*
31 * Operations for an allocator to implement. 32 * Operations for an allocator to implement.
@@ -173,25 +174,25 @@ static inline void alloc_unlock(struct gk20a_allocator *a)
173/* 174/*
174 * Buddy allocator specific initializers. 175 * Buddy allocator specific initializers.
175 */ 176 */
176int __gk20a_buddy_allocator_init(struct gk20a_allocator *a, 177int __gk20a_buddy_allocator_init(struct gk20a *g, struct gk20a_allocator *a,
177 struct vm_gk20a *vm, const char *name, 178 struct vm_gk20a *vm, const char *name,
178 u64 base, u64 size, u64 blk_size, 179 u64 base, u64 size, u64 blk_size,
179 u64 max_order, u64 flags); 180 u64 max_order, u64 flags);
180int gk20a_buddy_allocator_init(struct gk20a_allocator *allocator, 181int gk20a_buddy_allocator_init(struct gk20a *g, struct gk20a_allocator *a,
181 const char *name, u64 base, u64 size, 182 const char *name, u64 base, u64 size,
182 u64 blk_size, u64 flags); 183 u64 blk_size, u64 flags);
183 184
184/* 185/*
185 * Bitmap initializers. 186 * Bitmap initializers.
186 */ 187 */
187int gk20a_bitmap_allocator_init(struct gk20a_allocator *__a, 188int gk20a_bitmap_allocator_init(struct gk20a *g, struct gk20a_allocator *a,
188 const char *name, u64 base, u64 length, 189 const char *name, u64 base, u64 length,
189 u64 blk_size, u64 flags); 190 u64 blk_size, u64 flags);
190 191
191/* 192/*
192 * Page allocator initializers. 193 * Page allocator initializers.
193 */ 194 */
194int gk20a_page_allocator_init(struct gk20a_allocator *__a, 195int gk20a_page_allocator_init(struct gk20a *g, struct gk20a_allocator *a,
195 const char *name, u64 base, u64 length, 196 const char *name, u64 base, u64 length,
196 u64 blk_size, u64 flags); 197 u64 blk_size, u64 flags);
197 198
@@ -200,7 +201,7 @@ int gk20a_page_allocator_init(struct gk20a_allocator *__a,
200 * Note: This allocator can only allocate fixed-size structures of a 201 * Note: This allocator can only allocate fixed-size structures of a
201 * pre-defined size. 202 * pre-defined size.
202 */ 203 */
203int gk20a_lockless_allocator_init(struct gk20a_allocator *__a, 204int gk20a_lockless_allocator_init(struct gk20a *g, struct gk20a_allocator *a,
204 const char *name, u64 base, u64 length, 205 const char *name, u64 base, u64 length,
205 u64 struct_size, u64 flags); 206 u64 struct_size, u64 flags);
206 207
@@ -234,8 +235,9 @@ void gk20a_alloc_print_stats(struct gk20a_allocator *a,
234/* 235/*
235 * Common functionality for the internals of the allocators. 236 * Common functionality for the internals of the allocators.
236 */ 237 */
237void gk20a_init_alloc_debug(struct gk20a_allocator *a); 238void gk20a_init_alloc_debug(struct gk20a *g, struct gk20a_allocator *a);
238void gk20a_fini_alloc_debug(struct gk20a_allocator *a); 239void gk20a_fini_alloc_debug(struct gk20a_allocator *a);
240
239int __gk20a_alloc_common_init(struct gk20a_allocator *a, 241int __gk20a_alloc_common_init(struct gk20a_allocator *a,
240 const char *name, void *priv, bool dbg, 242 const char *name, void *priv, bool dbg,
241 const struct gk20a_allocator_ops *ops); 243 const struct gk20a_allocator_ops *ops);