Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457006 > unrolled thread

Re: [PATCH] kernel/cpu: Distinct name for cpu_hotplug.dep_map

Started byChris Wilson <chris@chris-wilson.co.uk>
First post2016-08-05 12:30 +0200
Last post2016-08-05 12:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] kernel/cpu: Distinct name for cpu_hotplug.dep_map Chris Wilson <chris@chris-wilson.co.uk> - 2016-08-05 12:30 +0200

#1457006 — Re: [PATCH] kernel/cpu: Distinct name for cpu_hotplug.dep_map

FromChris Wilson <chris@chris-wilson.co.uk>
Date2016-08-05 12:30 +0200
SubjectRe: [PATCH] kernel/cpu: Distinct name for cpu_hotplug.dep_map
Message-ID<s2Ky6-6dg-9@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web