Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/locking: fix __stack_depot_* name conflict

Commit cd06ab2fd48f ("drm/locking: add backtrace for locking contended
locks without backoff") added functions named __stack_depot_* in drm
which conflict with stack depot. Rename to __drm_stack_depot_*.

v2 by Jani:
- Also rename __stack_depot_print

References: https://lore.kernel.org/r/20211015202648.258445ef@canb.auug.org.au
Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211018085113.27033-1-jani.nikula@intel.com
(cherry picked from commit c4f08d7246a520da5f2b1068f635da0678485e33)

authored by

Stephen Rothwell and committed by
Jani Nikula
bcae3af2 d89c0c83

+7 -7
+7 -7
drivers/gpu/drm/drm_modeset_lock.c
··· 79 79 static DEFINE_WW_CLASS(crtc_ww_class); 80 80 81 81 #if IS_ENABLED(CONFIG_DRM_DEBUG_MODESET_LOCK) 82 - static noinline depot_stack_handle_t __stack_depot_save(void) 82 + static noinline depot_stack_handle_t __drm_stack_depot_save(void) 83 83 { 84 84 unsigned long entries[8]; 85 85 unsigned int n; ··· 89 89 return stack_depot_save(entries, n, GFP_NOWAIT | __GFP_NOWARN); 90 90 } 91 91 92 - static void __stack_depot_print(depot_stack_handle_t stack_depot) 92 + static void __drm_stack_depot_print(depot_stack_handle_t stack_depot) 93 93 { 94 94 struct drm_printer p = drm_debug_printer("drm_modeset_lock"); 95 95 unsigned long *entries; ··· 108 108 kfree(buf); 109 109 } 110 110 #else /* CONFIG_DRM_DEBUG_MODESET_LOCK */ 111 - static depot_stack_handle_t __stack_depot_save(void) 111 + static depot_stack_handle_t __drm_stack_depot_save(void) 112 112 { 113 113 return 0; 114 114 } 115 - static void __stack_depot_print(depot_stack_handle_t stack_depot) 115 + static void __drm_stack_depot_print(depot_stack_handle_t stack_depot) 116 116 { 117 117 } 118 118 #endif /* CONFIG_DRM_DEBUG_MODESET_LOCK */ ··· 266 266 void drm_modeset_drop_locks(struct drm_modeset_acquire_ctx *ctx) 267 267 { 268 268 if (WARN_ON(ctx->contended)) 269 - __stack_depot_print(ctx->stack_depot); 269 + __drm_stack_depot_print(ctx->stack_depot); 270 270 271 271 while (!list_empty(&ctx->locked)) { 272 272 struct drm_modeset_lock *lock; ··· 286 286 int ret; 287 287 288 288 if (WARN_ON(ctx->contended)) 289 - __stack_depot_print(ctx->stack_depot); 289 + __drm_stack_depot_print(ctx->stack_depot); 290 290 291 291 if (ctx->trylock_only) { 292 292 lockdep_assert_held(&ctx->ww_ctx); ··· 317 317 ret = 0; 318 318 } else if (ret == -EDEADLK) { 319 319 ctx->contended = lock; 320 - ctx->stack_depot = __stack_depot_save(); 320 + ctx->stack_depot = __drm_stack_depot_save(); 321 321 } 322 322 323 323 return ret;