public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [Intel-gfx] [PATCH] drm/locking: fix __stack_depot_* name conflict
Date: Tue, 19 Oct 2021 15:10:55 +0300	[thread overview]
Message-ID: <878rypqkog.fsf@intel.com> (raw)
In-Reply-To: <20211018085113.27033-1-jani.nikula@intel.com>

On Mon, 18 Oct 2021, Jani Nikula <jani.nikula@intel.com> wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
>
> 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>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Pushed to drm-misc-next with Daniel's IRC r-b. Thanks for the original
patch and review.

BR,
Jani.

> ---
>  drivers/gpu/drm/drm_modeset_lock.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
> index 4d32b61fa1fd..c97323365675 100644
> --- a/drivers/gpu/drm/drm_modeset_lock.c
> +++ b/drivers/gpu/drm/drm_modeset_lock.c
> @@ -79,7 +79,7 @@
>  static DEFINE_WW_CLASS(crtc_ww_class);
>  
>  #if IS_ENABLED(CONFIG_DRM_DEBUG_MODESET_LOCK)
> -static noinline depot_stack_handle_t __stack_depot_save(void)
> +static noinline depot_stack_handle_t __drm_stack_depot_save(void)
>  {
>  	unsigned long entries[8];
>  	unsigned int n;
> @@ -89,7 +89,7 @@ static noinline depot_stack_handle_t __stack_depot_save(void)
>  	return stack_depot_save(entries, n, GFP_NOWAIT | __GFP_NOWARN);
>  }
>  
> -static void __stack_depot_print(depot_stack_handle_t stack_depot)
> +static void __drm_stack_depot_print(depot_stack_handle_t stack_depot)
>  {
>  	struct drm_printer p = drm_debug_printer("drm_modeset_lock");
>  	unsigned long *entries;
> @@ -108,11 +108,11 @@ static void __stack_depot_print(depot_stack_handle_t stack_depot)
>  	kfree(buf);
>  }
>  #else /* CONFIG_DRM_DEBUG_MODESET_LOCK */
> -static depot_stack_handle_t __stack_depot_save(void)
> +static depot_stack_handle_t __drm_stack_depot_save(void)
>  {
>  	return 0;
>  }
> -static void __stack_depot_print(depot_stack_handle_t stack_depot)
> +static void __drm_stack_depot_print(depot_stack_handle_t stack_depot)
>  {
>  }
>  #endif /* CONFIG_DRM_DEBUG_MODESET_LOCK */
> @@ -266,7 +266,7 @@ EXPORT_SYMBOL(drm_modeset_acquire_fini);
>  void drm_modeset_drop_locks(struct drm_modeset_acquire_ctx *ctx)
>  {
>  	if (WARN_ON(ctx->contended))
> -		__stack_depot_print(ctx->stack_depot);
> +		__drm_stack_depot_print(ctx->stack_depot);
>  
>  	while (!list_empty(&ctx->locked)) {
>  		struct drm_modeset_lock *lock;
> @@ -286,7 +286,7 @@ static inline int modeset_lock(struct drm_modeset_lock *lock,
>  	int ret;
>  
>  	if (WARN_ON(ctx->contended))
> -		__stack_depot_print(ctx->stack_depot);
> +		__drm_stack_depot_print(ctx->stack_depot);
>  
>  	if (ctx->trylock_only) {
>  		lockdep_assert_held(&ctx->ww_ctx);
> @@ -317,7 +317,7 @@ static inline int modeset_lock(struct drm_modeset_lock *lock,
>  		ret = 0;
>  	} else if (ret == -EDEADLK) {
>  		ctx->contended = lock;
> -		ctx->stack_depot = __stack_depot_save();
> +		ctx->stack_depot = __drm_stack_depot_save();
>  	}
>  
>  	return ret;

-- 
Jani Nikula, Intel Open Source Graphics Center

      parent reply	other threads:[~2021-10-19 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  8:51 [Intel-gfx] [PATCH] drm/locking: fix __stack_depot_* name conflict Jani Nikula
2021-10-18 11:22 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-10-18 11:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-18 14:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-10-19 12:10 ` Jani Nikula [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rypqkog.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox