diff mbox series

linux-next: build failure after merge of the drm-misc tree

Message ID 20211015202648.258445ef@canb.auug.org.au (mailing list archive)
State New, archived
Headers show
Series linux-next: build failure after merge of the drm-misc tree | expand

Commit Message

Stephen Rothwell Oct. 15, 2021, 9:26 a.m. UTC
Hi all,

After merging the drm-misc tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/gpu/drm/drm_modeset_lock.c:111:29: error: conflicting types for '__stack_depot_save'
  111 | static depot_stack_handle_t __stack_depot_save(void)
      |                             ^~~~~~~~~~~~~~~~~~
In file included from include/linux/page_ext.h:7,
                 from include/linux/mm.h:25,
                 from include/linux/kallsyms.h:13,
                 from include/linux/bpf.h:20,
                 from include/linux/bpf-cgroup.h:5,
                 from include/linux/cgroup-defs.h:22,
                 from include/linux/cgroup.h:28,
                 from include/linux/memcontrol.h:13,
                 from include/linux/swap.h:9,
                 from include/linux/suspend.h:5,
                 from include/linux/regulator/consumer.h:35,
                 from include/linux/i2c.h:18,
                 from include/drm/drm_crtc.h:28,
                 from include/drm/drm_atomic.h:31,
                 from drivers/gpu/drm/drm_modeset_lock.c:24:
include/linux/stackdepot.h:18:22: note: previous declaration of '__stack_depot_save' was here
   18 | depot_stack_handle_t __stack_depot_save(unsigned long *entries,
      |                      ^~~~~~~~~~~~~~~~~~

Caused by commit

  cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")

This may only have been revealed because of another fix I have had to
apply today.

I have applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 15 Oct 2021 20:17:52 +1100
Subject: [PATCH] drm/locking: fix for name conflict

Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/drm_modeset_lock.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jani Nikula Oct. 15, 2021, 9:56 a.m. UTC | #1
On Fri, 15 Oct 2021, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> After merging the drm-misc tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> drivers/gpu/drm/drm_modeset_lock.c:111:29: error: conflicting types for '__stack_depot_save'
>   111 | static depot_stack_handle_t __stack_depot_save(void)
>       |                             ^~~~~~~~~~~~~~~~~~
> In file included from include/linux/page_ext.h:7,
>                  from include/linux/mm.h:25,
>                  from include/linux/kallsyms.h:13,
>                  from include/linux/bpf.h:20,
>                  from include/linux/bpf-cgroup.h:5,
>                  from include/linux/cgroup-defs.h:22,
>                  from include/linux/cgroup.h:28,
>                  from include/linux/memcontrol.h:13,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from include/linux/regulator/consumer.h:35,
>                  from include/linux/i2c.h:18,
>                  from include/drm/drm_crtc.h:28,
>                  from include/drm/drm_atomic.h:31,
>                  from drivers/gpu/drm/drm_modeset_lock.c:24:
> include/linux/stackdepot.h:18:22: note: previous declaration of '__stack_depot_save' was here
>    18 | depot_stack_handle_t __stack_depot_save(unsigned long *entries,
>       |                      ^~~~~~~~~~~~~~~~~~
>
> Caused by commit
>
>   cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
>
> This may only have been revealed because of another fix I have had to
> apply today.
>
> I have applied the following patch for today.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 15 Oct 2021 20:17:52 +1100
> Subject: [PATCH] drm/locking: fix for name conflict
>
> Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

My bad, what was I thinking using stack depot's "namespace".

The fix looks good, but I'd rename __stack_depot_print too added in the
same commit. Do you want to respin or shall I take it from here?

Thanks,
Jani.



> ---
>  drivers/gpu/drm/drm_modeset_lock.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
> index 4d32b61fa1fd..ee36dd20900d 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;
> @@ -108,7 +108,7 @@ 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;
>  }
> @@ -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;
> -- 
> 2.33.0
Stephen Rothwell Oct. 15, 2021, 10:23 a.m. UTC | #2
Hi Jani,

On Fri, 15 Oct 2021 12:56:58 +0300 Jani Nikula <jani.nikula@intel.com> wrote:
>
> The fix looks good, but I'd rename __stack_depot_print too added in the
> same commit. Do you want to respin or shall I take it from here?

If you are happy to take it on, then thanks.
Stephen Rothwell Nov. 1, 2021, 8:42 a.m. UTC | #3
Hi all,

On Fri, 15 Oct 2021 20:26:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the drm-misc tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> drivers/gpu/drm/drm_modeset_lock.c:111:29: error: conflicting types for '__stack_depot_save'
>   111 | static depot_stack_handle_t __stack_depot_save(void)
>       |                             ^~~~~~~~~~~~~~~~~~
> In file included from include/linux/page_ext.h:7,
>                  from include/linux/mm.h:25,
>                  from include/linux/kallsyms.h:13,
>                  from include/linux/bpf.h:20,
>                  from include/linux/bpf-cgroup.h:5,
>                  from include/linux/cgroup-defs.h:22,
>                  from include/linux/cgroup.h:28,
>                  from include/linux/memcontrol.h:13,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from include/linux/regulator/consumer.h:35,
>                  from include/linux/i2c.h:18,
>                  from include/drm/drm_crtc.h:28,
>                  from include/drm/drm_atomic.h:31,
>                  from drivers/gpu/drm/drm_modeset_lock.c:24:
> include/linux/stackdepot.h:18:22: note: previous declaration of '__stack_depot_save' was here
>    18 | depot_stack_handle_t __stack_depot_save(unsigned long *entries,
>       |                      ^~~~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
> 
> This may only have been revealed because of another fix I have had to
> apply today.
> 
> I have applied the following patch for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 15 Oct 2021 20:17:52 +1100
> Subject: [PATCH] drm/locking: fix for name conflict
> 
> Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/drm_modeset_lock.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
> index 4d32b61fa1fd..ee36dd20900d 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;
> @@ -108,7 +108,7 @@ 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;
>  }
> @@ -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;
> -- 
> 2.33.0

This has reappeared today.  I don't know what happened to the drm-misc
tree over the weeked :-(

I have reapplied the above fix.
Stephen Rothwell Nov. 5, 2021, 6:15 a.m. UTC | #4
Hi all,

On Mon, 1 Nov 2021 19:42:23 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Fri, 15 Oct 2021 20:26:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the drm-misc tree, today's linux-next build (arm
> > multi_v7_defconfig) failed like this:
> > 
> > drivers/gpu/drm/drm_modeset_lock.c:111:29: error: conflicting types for '__stack_depot_save'
> >   111 | static depot_stack_handle_t __stack_depot_save(void)
> >       |                             ^~~~~~~~~~~~~~~~~~
> > In file included from include/linux/page_ext.h:7,
> >                  from include/linux/mm.h:25,
> >                  from include/linux/kallsyms.h:13,
> >                  from include/linux/bpf.h:20,
> >                  from include/linux/bpf-cgroup.h:5,
> >                  from include/linux/cgroup-defs.h:22,
> >                  from include/linux/cgroup.h:28,
> >                  from include/linux/memcontrol.h:13,
> >                  from include/linux/swap.h:9,
> >                  from include/linux/suspend.h:5,
> >                  from include/linux/regulator/consumer.h:35,
> >                  from include/linux/i2c.h:18,
> >                  from include/drm/drm_crtc.h:28,
> >                  from include/drm/drm_atomic.h:31,
> >                  from drivers/gpu/drm/drm_modeset_lock.c:24:
> > include/linux/stackdepot.h:18:22: note: previous declaration of '__stack_depot_save' was here
> >    18 | depot_stack_handle_t __stack_depot_save(unsigned long *entries,
> >       |                      ^~~~~~~~~~~~~~~~~~
> > 
> > Caused by commit
> > 
> >   cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
> > 
> > This may only have been revealed because of another fix I have had to
> > apply today.
> > 
> > I have applied the following patch for today.
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Fri, 15 Oct 2021 20:17:52 +1100
> > Subject: [PATCH] drm/locking: fix for name conflict
> > 
> > Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/gpu/drm/drm_modeset_lock.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
> > index 4d32b61fa1fd..ee36dd20900d 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;
> > @@ -108,7 +108,7 @@ 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;
> >  }
> > @@ -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;
> 
> This has reappeared today.  I don't know what happened to the drm-misc
> tree over the weeked :-(
> 
> I have reapplied the above fix.

So the above drm-misc commit is now in the drm tree, but its fix up
commit vanished from the drm-misc tree over the past weekend :-(
Jani Nikula Nov. 5, 2021, 11:03 a.m. UTC | #5
On Fri, 05 Nov 2021, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> On Mon, 1 Nov 2021 19:42:23 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> On Fri, 15 Oct 2021 20:26:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> >
>> > After merging the drm-misc tree, today's linux-next build (arm
>> > multi_v7_defconfig) failed like this:
>> > 
>> > drivers/gpu/drm/drm_modeset_lock.c:111:29: error: conflicting types for '__stack_depot_save'
>> >   111 | static depot_stack_handle_t __stack_depot_save(void)
>> >       |                             ^~~~~~~~~~~~~~~~~~
>> > In file included from include/linux/page_ext.h:7,
>> >                  from include/linux/mm.h:25,
>> >                  from include/linux/kallsyms.h:13,
>> >                  from include/linux/bpf.h:20,
>> >                  from include/linux/bpf-cgroup.h:5,
>> >                  from include/linux/cgroup-defs.h:22,
>> >                  from include/linux/cgroup.h:28,
>> >                  from include/linux/memcontrol.h:13,
>> >                  from include/linux/swap.h:9,
>> >                  from include/linux/suspend.h:5,
>> >                  from include/linux/regulator/consumer.h:35,
>> >                  from include/linux/i2c.h:18,
>> >                  from include/drm/drm_crtc.h:28,
>> >                  from include/drm/drm_atomic.h:31,
>> >                  from drivers/gpu/drm/drm_modeset_lock.c:24:
>> > include/linux/stackdepot.h:18:22: note: previous declaration of '__stack_depot_save' was here
>> >    18 | depot_stack_handle_t __stack_depot_save(unsigned long *entries,
>> >       |                      ^~~~~~~~~~~~~~~~~~
>> > 
>> > Caused by commit
>> > 
>> >   cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
>> > 
>> > This may only have been revealed because of another fix I have had to
>> > apply today.
>> > 
>> > I have applied the following patch for today.
>> > 
>> > From: Stephen Rothwell <sfr@canb.auug.org.au>
>> > Date: Fri, 15 Oct 2021 20:17:52 +1100
>> > Subject: [PATCH] drm/locking: fix for name conflict
>> > 
>> > Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
>> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> > ---
>> >  drivers/gpu/drm/drm_modeset_lock.c | 6 +++---
>> >  1 file changed, 3 insertions(+), 3 deletions(-)
>> > 
>> > diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
>> > index 4d32b61fa1fd..ee36dd20900d 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;
>> > @@ -108,7 +108,7 @@ 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;
>> >  }
>> > @@ -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;
>> 
>> This has reappeared today.  I don't know what happened to the drm-misc
>> tree over the weeked :-(
>> 
>> I have reapplied the above fix.
>
> So the above drm-misc commit is now in the drm tree, but its fix up
> commit vanished from the drm-misc tree over the past weekend :-(

Cc: drm-misc maintainers.

We normally point drm-misc/for-linux-next at drm-misc-next, *except* to
drm-misc-next-fixes during the merge window. This is because
drm-misc-next already starts accumulating stuff that's headed to one
release later, e.g. currently v5.17. I think that's part of the reason.

I probably should have pushed c4f08d7246a5 ("drm/locking: fix
__stack_depot_* name conflict") to drm-misc-next-fixes.

There's still something funny going on, because the drm-misc-next pull
request [1] isn't part of the drm pull request for v5.16 [2]. Is there
going to be another drm pull?

BR,
Jani.


[1] https://lore.kernel.org/r/20211014120452.2wicnt6hobu3kbwb@gilmour
[2] https://lore.kernel.org/r/CAPM=9tyOyz4_-OdjDduFkponSXycO6maBDFsWGTLv+j=_Vp6ww@mail.gmail.com
Maxime Ripard Nov. 5, 2021, 11:57 a.m. UTC | #6
Hi,

On Fri, Nov 05, 2021 at 01:03:43PM +0200, Jani Nikula wrote:
> On Fri, 05 Nov 2021, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > Hi all,
> >
> > On Mon, 1 Nov 2021 19:42:23 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >>
> >> On Fri, 15 Oct 2021 20:26:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >> >
> >> > After merging the drm-misc tree, today's linux-next build (arm
> >> > multi_v7_defconfig) failed like this:
> >> > 
> >> > drivers/gpu/drm/drm_modeset_lock.c:111:29: error: conflicting types for '__stack_depot_save'
> >> >   111 | static depot_stack_handle_t __stack_depot_save(void)
> >> >       |                             ^~~~~~~~~~~~~~~~~~
> >> > In file included from include/linux/page_ext.h:7,
> >> >                  from include/linux/mm.h:25,
> >> >                  from include/linux/kallsyms.h:13,
> >> >                  from include/linux/bpf.h:20,
> >> >                  from include/linux/bpf-cgroup.h:5,
> >> >                  from include/linux/cgroup-defs.h:22,
> >> >                  from include/linux/cgroup.h:28,
> >> >                  from include/linux/memcontrol.h:13,
> >> >                  from include/linux/swap.h:9,
> >> >                  from include/linux/suspend.h:5,
> >> >                  from include/linux/regulator/consumer.h:35,
> >> >                  from include/linux/i2c.h:18,
> >> >                  from include/drm/drm_crtc.h:28,
> >> >                  from include/drm/drm_atomic.h:31,
> >> >                  from drivers/gpu/drm/drm_modeset_lock.c:24:
> >> > include/linux/stackdepot.h:18:22: note: previous declaration of '__stack_depot_save' was here
> >> >    18 | depot_stack_handle_t __stack_depot_save(unsigned long *entries,
> >> >       |                      ^~~~~~~~~~~~~~~~~~
> >> > 
> >> > Caused by commit
> >> > 
> >> >   cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
> >> > 
> >> > This may only have been revealed because of another fix I have had to
> >> > apply today.
> >> > 
> >> > I have applied the following patch for today.
> >> > 
> >> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> >> > Date: Fri, 15 Oct 2021 20:17:52 +1100
> >> > Subject: [PATCH] drm/locking: fix for name conflict
> >> > 
> >> > Fixes: cd06ab2fd48f ("drm/locking: add backtrace for locking contended locks without backoff")
> >> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> >> > ---
> >> >  drivers/gpu/drm/drm_modeset_lock.c | 6 +++---
> >> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >> > 
> >> > diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
> >> > index 4d32b61fa1fd..ee36dd20900d 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;
> >> > @@ -108,7 +108,7 @@ 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;
> >> >  }
> >> > @@ -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;
> >> 
> >> This has reappeared today.  I don't know what happened to the drm-misc
> >> tree over the weeked :-(
> >> 
> >> I have reapplied the above fix.
> >
> > So the above drm-misc commit is now in the drm tree, but its fix up
> > commit vanished from the drm-misc tree over the past weekend :-(
> 
> Cc: drm-misc maintainers.
> 
> We normally point drm-misc/for-linux-next at drm-misc-next, *except* to
> drm-misc-next-fixes during the merge window. This is because
> drm-misc-next already starts accumulating stuff that's headed to one
> release later, e.g. currently v5.17. I think that's part of the reason.

Indeed

> I probably should have pushed c4f08d7246a5 ("drm/locking: fix
> __stack_depot_* name conflict") to drm-misc-next-fixes.
> 
> There's still something funny going on, because the drm-misc-next pull
> request [1] isn't part of the drm pull request for v5.16 [2]. Is there
> going to be another drm pull?

The last drm-misc-next PR for some reason didn't got logged into
patchwork, and Dave missed it.

We found out yesterday, and he pulled it today so I assume there will be
a second PR with that last PR and today's drm-misc-next-fixes PR.

Maxime
Stephen Rothwell Nov. 6, 2021, 2:33 a.m. UTC | #7
Hi Jani,

On Fri, 05 Nov 2021 13:03:43 +0200 Jani Nikula <jani.nikula@intel.com> wrote:
>
> I probably should have pushed c4f08d7246a5 ("drm/locking: fix
> __stack_depot_* name conflict") to drm-misc-next-fixes.

Please do so as builds will start failing otherwise :-(
Jani Nikula Nov. 9, 2021, 7:40 a.m. UTC | #8
On Sat, 06 Nov 2021, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Jani,
>
> On Fri, 05 Nov 2021 13:03:43 +0200 Jani Nikula <jani.nikula@intel.com> wrote:
>>
>> I probably should have pushed c4f08d7246a5 ("drm/locking: fix
>> __stack_depot_* name conflict") to drm-misc-next-fixes.
>
> Please do so as builds will start failing otherwise :-(

Thomas/Maxime/Maarten, okay to cherry-pick that to drm-misc-next-fixes?

BR,
Jani.
Daniel Vetter Nov. 9, 2021, 9:16 a.m. UTC | #9
On Tue, Nov 09, 2021 at 09:40:08AM +0200, Jani Nikula wrote:
> On Sat, 06 Nov 2021, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > Hi Jani,
> >
> > On Fri, 05 Nov 2021 13:03:43 +0200 Jani Nikula <jani.nikula@intel.com> wrote:
> >>
> >> I probably should have pushed c4f08d7246a5 ("drm/locking: fix
> >> __stack_depot_* name conflict") to drm-misc-next-fixes.
> >
> > Please do so as builds will start failing otherwise :-(
> 
> Thomas/Maxime/Maarten, okay to cherry-pick that to drm-misc-next-fixes?

Yeah just do, for drm-misc this is considered in committer purview. I
think we should add a section to the docs about "What if a patch is in the
wrong branch" which tells you to just cherry-pick -x or whatever.
-Daniel
Jani Nikula Nov. 9, 2021, 11:09 a.m. UTC | #10
On Tue, 09 Nov 2021, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, Nov 09, 2021 at 09:40:08AM +0200, Jani Nikula wrote:
>> On Sat, 06 Nov 2021, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> > Hi Jani,
>> >
>> > On Fri, 05 Nov 2021 13:03:43 +0200 Jani Nikula <jani.nikula@intel.com> wrote:
>> >>
>> >> I probably should have pushed c4f08d7246a5 ("drm/locking: fix
>> >> __stack_depot_* name conflict") to drm-misc-next-fixes.
>> >
>> > Please do so as builds will start failing otherwise :-(
>> 
>> Thomas/Maxime/Maarten, okay to cherry-pick that to drm-misc-next-fixes?
>
> Yeah just do, for drm-misc this is considered in committer purview. I
> think we should add a section to the docs about "What if a patch is in the
> wrong branch" which tells you to just cherry-pick -x or whatever.

Done.

BR,
Jani.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
index 4d32b61fa1fd..ee36dd20900d 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;
@@ -108,7 +108,7 @@  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;
 }
@@ -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;