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
Unified · Split
| @@ -79,7 +79,7 @@ · 78 unmodified lines | |||
| 79 | static DEFINE_WW_CLASS(crtc_ww_class); | 79 | static DEFINE_WW_CLASS(crtc_ww_class); |
| 80 | 80 | ||
| 81 | #if IS_ENABLED(CONFIG_DRM_DEBUG_MODESET_LOCK) | 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 | unsigned long entries[8]; | 84 | unsigned long entries[8]; |
| 85 | unsigned int n; | 85 | unsigned int n; |
| @@ -89,7 +89,7 @@ static noinline depot_stack_handle_t __stack_depot_save(void) · 3 unmodified lines | |||
| 89 | return stack_depot_save(entries, n, GFP_NOWAIT | __GFP_NOWARN); | 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 | struct drm_printer p = drm_debug_printer("drm_modeset_lock"); | 94 | struct drm_printer p = drm_debug_printer("drm_modeset_lock"); |
| 95 | unsigned long *entries; | 95 | unsigned long *entries; |
| @@ -108,11 +108,11 @@ static void __stack_depot_print(depot_stack_handle_t stack_depot) · 12 unmodified lines | |||
| 108 | kfree(buf); | 108 | kfree(buf); |
| 109 | } | 109 | } |
| 110 | #else /* CONFIG_DRM_DEBUG_MODESET_LOCK */ | 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 | return 0; | 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 | #endif /* CONFIG_DRM_DEBUG_MODESET_LOCK */ | 118 | #endif /* CONFIG_DRM_DEBUG_MODESET_LOCK */ |
| @@ -266,7 +266,7 @@ EXPORT_SYMBOL(drm_modeset_acquire_fini); · 147 unmodified lines | |||
| 266 | void drm_modeset_drop_locks(struct drm_modeset_acquire_ctx *ctx) | 266 | void drm_modeset_drop_locks(struct drm_modeset_acquire_ctx *ctx) |
| 267 | { | 267 | { |
| 268 | if (WARN_ON(ctx->contended)) | 268 | if (WARN_ON(ctx->contended)) |
| 269 | __stack_depot_print(ctx->stack_depot); | 269 | __drm_stack_depot_print(ctx->stack_depot); |
| 270 | 270 | ||
| 271 | while (!list_empty(&ctx->locked)) { | 271 | while (!list_empty(&ctx->locked)) { |
| 272 | struct drm_modeset_lock *lock; | 272 | struct drm_modeset_lock *lock; |
| @@ -286,7 +286,7 @@ static inline int modeset_lock(struct drm_modeset_lock *lock, · 13 unmodified lines | |||
| 286 | int ret; | 286 | int ret; |
| 287 | 287 | ||
| 288 | if (WARN_ON(ctx->contended)) | 288 | if (WARN_ON(ctx->contended)) |
| 289 | __stack_depot_print(ctx->stack_depot); | 289 | __drm_stack_depot_print(ctx->stack_depot); |
| 290 | 290 | ||
| 291 | if (ctx->trylock_only) { | 291 | if (ctx->trylock_only) { |
| 292 | lockdep_assert_held(&ctx->ww_ctx); | 292 | lockdep_assert_held(&ctx->ww_ctx); |
| @@ -317,7 +317,7 @@ static inline int modeset_lock(struct drm_modeset_lock *lock, · 24 unmodified lines | |||
| 317 | ret = 0; | 317 | ret = 0; |
| 318 | } else if (ret == -EDEADLK) { | 318 | } else if (ret == -EDEADLK) { |
| 319 | ctx->contended = lock; | 319 | ctx->contended = lock; |
| 320 | ctx->stack_depot = __stack_depot_save(); | 320 | ctx->stack_depot = __drm_stack_depot_save(); |
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | return ret; | 323 | return ret; |