From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Jani Nikula <jani.nikula@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
kbuild-all@01.org, Thomas Gleixner <tglx@linutronix.de>,
kbuild test robot <fengguang.wu@intel.com>
Subject: Re: [PATCH] drm/i915: properly init lockdep class
Date: Wed, 13 Dec 2017 16:00:49 +0200 [thread overview]
Message-ID: <1513173649.5228.42.camel@linux.intel.com> (raw)
In-Reply-To: <20171130151948.GF12606@linutronix.de>
On Thu, 2017-11-30 at 16:19 +0100, Sebastian Andrzej Siewior wrote:
> The code has an ifdef and uses two functions to either init the bare
> spinlock or init it and set a lock-class. It is possible to do the same
> thing without an ifdef.
> With this patch (in debug case) we first use the "default" lock class
> which is later overwritten to the supplied one. Without lockdep the set
> name/class function vanishes.
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
How exactly did kbuild test robot figure this out?
At least according to the source there doesn't seem to be clarity about
what is the right thing to do, this being just one option.
Regards, Joonas
> +++ b/drivers/gpu/drm/i915/i915_gem_timeline.c
> @@ -33,11 +33,8 @@ static void __intel_timeline_init(struct
> {
> tl->fence_context = context;
> tl->common = parent;
> -#ifdef CONFIG_DEBUG_SPINLOCK
> - __raw_spin_lock_init(&tl->lock.rlock, lockname, lockclass);
> -#else
> spin_lock_init(&tl->lock);
> -#endif
> + lockdep_set_class_and_name(&tl->lock, lockclass, lockname);
> init_request_active(&tl->last_request, NULL);
> INIT_LIST_HEAD(&tl->requests);
> i915_syncmap_init(&tl->sync);
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-12-13 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201711250649.n1NUHo79%fengguang.wu@intel.com>
2017-11-30 15:19 ` [PATCH] drm/i915: properly init lockdep class Sebastian Andrzej Siewior
2017-12-13 14:00 ` Joonas Lahtinen [this message]
2017-12-13 15:06 ` Sebastian Andrzej Siewior
2017-12-13 15:37 ` Joonas Lahtinen
2017-12-13 17:36 ` Sebastian Andrzej Siewior
2017-12-13 18:40 ` Peter Zijlstra
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=1513173649.5228.42.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=airlied@linux.ie \
--cc=bigeasy@linutronix.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=fengguang.wu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=kbuild-all@01.org \
--cc=rodrigo.vivi@intel.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.