linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Daniel Vetter <daniel@ffwll.ch>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	intel-gfx@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: intel_sdvo_init: trying to register non-static key
Date: Fri, 07 Feb 2014 18:47:54 +0200	[thread overview]
Message-ID: <1391791674.21697.2.camel@intelbox> (raw)
In-Reply-To: <20140207154911.GK24395@pd.tnic>

[-- Attachment #1: Type: text/plain, Size: 1542 bytes --]

On Fri, 2014-02-07 at 16:49 +0100, Borislav Petkov wrote:
> On Fri, Feb 07, 2014 at 05:32:06PM +0200, Imre Deak wrote:
> > I just realized it's a different issue, since it's on the init path.
> > Also we set the drm device as the parent for the sdvo i2c adapter as
> > opposed to the dp i2c adapter where it's the connector device. So the
> > above patch won't help in Borislav's case.

Ok, not sure why the sdvo initialization fails, but the lockdep warning
is probably fixed by the below patch. Could you try it and send a dmesg
with drm.debug=0xe?

diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 5104cf5..bd6e18b 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -187,19 +187,23 @@ static void kernfs_deactivate(struct kernfs_node
*kn)
 
 	kn->u.completion = (void *)&wait;
 
-	rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_);
+	if (kn->flags & KERNFS_LOCKDEP)
+		rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_);
 	/* atomic_add_return() is a mb(), put_active() will always see
 	 * the updated kn->u.completion.
 	 */
 	v = atomic_add_return(KN_DEACTIVATED_BIAS, &kn->active);
 
 	if (v != KN_DEACTIVATED_BIAS) {
-		lock_contended(&kn->dep_map, _RET_IP_);
+		if (kn->flags & KERNFS_LOCKDEP)
+			lock_contended(&kn->dep_map, _RET_IP_);
 		wait_for_completion(&wait);
 	}
 
-	lock_acquired(&kn->dep_map, _RET_IP_);
-	rwsem_release(&kn->dep_map, 1, _RET_IP_);
+	if (kn->flags & KERNFS_LOCKDEP) {
+		lock_acquired(&kn->dep_map, _RET_IP_);
+		rwsem_release(&kn->dep_map, 1, _RET_IP_);
+	}
 }
 



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2014-02-07 16:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07  9:32 intel_sdvo_init: trying to register non-static key Borislav Petkov
2014-02-07 11:04 ` Jani Nikula
2014-02-07 11:12   ` Imre Deak
2014-02-07 11:28     ` Borislav Petkov
2014-02-07 14:51       ` Daniel Vetter
2014-02-07 15:32         ` Imre Deak
2014-02-07 15:49           ` Borislav Petkov
2014-02-07 16:47             ` Imre Deak [this message]
2014-02-10 15:49               ` Borislav Petkov

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=1391791674.21697.2.camel@intelbox \
    --to=imre.deak@intel.com \
    --cc=airlied@linux.ie \
    --cc=bp@alien8.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).