linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel/cpu: Distinctive name for cpu_hotplug.dep_map
@ 2016-02-03 14:24 Joonas Lahtinen
  2016-02-03 17:12 ` Gautham R Shenoy
  0 siblings, 1 reply; 5+ messages in thread
From: Joonas Lahtinen @ 2016-02-03 14:24 UTC (permalink / raw)
  To: Linux kernel development
  Cc: Joonas Lahtinen, Gautham R. Shenoy, Rafael J. Wysocki,
	Intel graphics driver community testing & development

Use distinctive name for cpu_hotplug.dep_map to avoid the actual
cpu_hotplug.lock appearing as cpu_hotplug.lock#2 in lockdep splats.

Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Intel graphics driver community testing & development <intel-gfx@lists.freedesktop.org>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 kernel/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 5b9d396..6a13f24 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -78,7 +78,7 @@ static struct {
 	.wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
 	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-	.dep_map = {.name = "cpu_hotplug.lock" },
+	.dep_map = STATIC_LOCKDEP_MAP_INIT("cpu_hotplug.dep_map", &cpu_hotplug.dep_map),
 #endif
 };
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernel/cpu: Distinctive name for cpu_hotplug.dep_map
  2016-02-03 14:24 [PATCH] kernel/cpu: Distinctive name for cpu_hotplug.dep_map Joonas Lahtinen
@ 2016-02-03 17:12 ` Gautham R Shenoy
  2016-02-15 12:30   ` Joonas Lahtinen
  0 siblings, 1 reply; 5+ messages in thread
From: Gautham R Shenoy @ 2016-02-03 17:12 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: Linux kernel development, Gautham R. Shenoy, Rafael J. Wysocki,
	Intel graphics driver community testing & development

Hello Joonas,

On Wed, Feb 03, 2016 at 04:24:28PM +0200, Joonas Lahtinen wrote:
> Use distinctive name for cpu_hotplug.dep_map to avoid the actual
> cpu_hotplug.lock appearing as cpu_hotplug.lock#2 in lockdep splats.
> 
> Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: Intel graphics driver community testing & development <intel-gfx@lists.freedesktop.org>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  kernel/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 5b9d396..6a13f24 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -78,7 +78,7 @@ static struct {
>  	.wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
>  	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
>  #ifdef CONFIG_DEBUG_LOCK_ALLOC
> -	.dep_map = {.name = "cpu_hotplug.lock" },
> +	.dep_map = STATIC_LOCKDEP_MAP_INIT("cpu_hotplug.dep_map", &cpu_hotplug.dep_map),

Looks good to me!
Acked-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>

--
Thanks and Regards
gautham.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernel/cpu: Distinctive name for cpu_hotplug.dep_map
  2016-02-03 17:12 ` Gautham R Shenoy
@ 2016-02-15 12:30   ` Joonas Lahtinen
  2016-06-09 11:48     ` [PATCH] kernel/cpu: Distinct " Joonas Lahtinen
  0 siblings, 1 reply; 5+ messages in thread
From: Joonas Lahtinen @ 2016-02-15 12:30 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, ego
  Cc: Linux kernel development, Rafael J. Wysocki,
	Intel graphics driver community testing & development

Hi,

According to scripts/get_maintainer.pl Ingo or Peter would be more
appropriate to merge.

Added them as To:

On ke, 2016-02-03 at 22:42 +0530, Gautham R Shenoy wrote:
> Hello Joonas,
> 
> On Wed, Feb 03, 2016 at 04:24:28PM +0200, Joonas Lahtinen wrote:
> > Use distinctive name for cpu_hotplug.dep_map to avoid the actual
> > cpu_hotplug.lock appearing as cpu_hotplug.lock#2 in lockdep splats.
> > 
> > Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> > Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > Cc: Intel graphics driver community testing & development <intel-gf
> > x@lists.freedesktop.org>
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > ---
> >  kernel/cpu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel/cpu.c b/kernel/cpu.c
> > index 5b9d396..6a13f24 100644
> > --- a/kernel/cpu.c
> > +++ b/kernel/cpu.c
> > @@ -78,7 +78,7 @@ static struct {
> >  	.wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
> >  	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
> >  #ifdef CONFIG_DEBUG_LOCK_ALLOC
> > -	.dep_map = {.name = "cpu_hotplug.lock" },
> > +	.dep_map = STATIC_LOCKDEP_MAP_INIT("cpu_hotplug.dep_map",
> > &cpu_hotplug.dep_map),
> 
> Looks good to me!
> Acked-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> 

Thanks!

Regards, Joonas

> --
> Thanks and Regards
> gautham.
> 
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] kernel/cpu: Distinct name for cpu_hotplug.dep_map
  2016-02-15 12:30   ` Joonas Lahtinen
@ 2016-06-09 11:48     ` Joonas Lahtinen
  2016-08-05 10:26       ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Joonas Lahtinen @ 2016-06-09 11:48 UTC (permalink / raw)
  To: Linux kernel development
  Cc: Joonas Lahtinen, Ingo Molnar, Peter Zijlstra, Gautham R. Shenoy,
	intel-gfx, trivial

Use distinctive name for cpu_hotplug.dep_map to avoid the actual
cpu_hotplug.lock appearing as cpu_hotplug.lock#2 in lockdep splats.

Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: trivial@kernel.org
Acked-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
This time CC'ing trivial@kernel.org too in the hopes of finally getting this in.
---
 kernel/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index d948e44..d74199d 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -155,7 +155,7 @@ static struct {
 	.wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
 	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-	.dep_map = {.name = "cpu_hotplug.lock" },
+	.dep_map = STATIC_LOCKDEP_MAP_INIT("cpu_hotplug.dep_map", &cpu_hotplug.dep_map),
 #endif
 };
 
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernel/cpu: Distinct name for cpu_hotplug.dep_map
  2016-06-09 11:48     ` [PATCH] kernel/cpu: Distinct " Joonas Lahtinen
@ 2016-08-05 10:26       ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2016-08-05 10:26 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: Linux kernel development, Ingo Molnar, Peter Zijlstra,
	Gautham R. Shenoy, intel-gfx, trivial

On Thu, Jun 09, 2016 at 02:48:39PM +0300, Joonas Lahtinen wrote:
> Use distinctive name for cpu_hotplug.dep_map to avoid the actual
> cpu_hotplug.lock appearing as cpu_hotplug.lock#2 in lockdep splats.
> 
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Cc: intel-gfx@lists.freedesktop.org
> Cc: trivial@kernel.org
> Acked-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
> This time CC'ing trivial@kernel.org too in the hopes of finally getting this in.
> ---
>  kernel/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index d948e44..d74199d 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -155,7 +155,7 @@ static struct {
>  	.wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq),
>  	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
>  #ifdef CONFIG_DEBUG_LOCK_ALLOC
> -	.dep_map = {.name = "cpu_hotplug.lock" },
> +	.dep_map = STATIC_LOCKDEP_MAP_INIT("cpu_hotplug.dep_map", &cpu_hotplug.dep_map),
>  #endif
>  };


Going by

        /*
         * Static locks do not have their class-keys yet - for them the key
         * is the lock object itself:
         */
        if (unlikely(!lock->key))
                lock->key = (void *)lock;

this is the right choice for .key (as lock here is the dep_map).

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-05 10:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 14:24 [PATCH] kernel/cpu: Distinctive name for cpu_hotplug.dep_map Joonas Lahtinen
2016-02-03 17:12 ` Gautham R Shenoy
2016-02-15 12:30   ` Joonas Lahtinen
2016-06-09 11:48     ` [PATCH] kernel/cpu: Distinct " Joonas Lahtinen
2016-08-05 10:26       ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).