[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-8180cfb96098f7066fbd0a44ac3aaf422f74609d@git.kernel.org>
Date: Thu, 18 Aug 2016 03:59:35 -0700
From: tip-bot for Johannes Berg <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: peterz@...radead.org, paulmck@...ux.vnet.ibm.com, mingo@...nel.org,
tglx@...utronix.de, chris@...is-wilson.co.uk,
akpm@...ux-foundation.org, hpa@...or.com, johannes.berg@...el.com,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
daniel.vetter@...ll.ch
Subject: [tip:locking/core] Revert "drm/fb-helper: Reduce READ_ONCE(master)
to lockless_dereference"
Commit-ID: 8180cfb96098f7066fbd0a44ac3aaf422f74609d
Gitweb: http://git.kernel.org/tip/8180cfb96098f7066fbd0a44ac3aaf422f74609d
Author: Johannes Berg <johannes.berg@...el.com>
AuthorDate: Thu, 11 Aug 2016 11:50:21 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 18 Aug 2016 11:34:26 +0200
Revert "drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference"
This reverts commit:
fa7d81bb3c269 ("drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference")
As Peter explained:
[...] lockless_dereference() is _stronger_ than READ_ONCE(), not weaker.
[...]
Also, clue is in the name: 'dereference', you don't actually dereference
the pointer here, only load it.
My next patch breaks the compile without this revert, because it assumes
you want to deference and thus also need the struct type visible (which
it isn't here), so revert it.
Tested-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Signed-off-by: Johannes Berg <johannes.berg@...el.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Daniel Vetter <daniel.vetter@...ll.ch>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Chris Wilson <chris@...is-wilson.co.uk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1470909022-687-1-git-send-email-johannes@sipsolutions.net
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
drivers/gpu/drm/drm_fb_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index ce54e98..0a06f91 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -464,7 +464,7 @@ static bool drm_fb_helper_is_bound(struct drm_fb_helper *fb_helper)
/* Sometimes user space wants everything disabled, so don't steal the
* display if there's a master. */
- if (lockless_dereference(dev->master))
+ if (READ_ONCE(dev->master))
return false;
drm_for_each_crtc(crtc, dev) {
Powered by blists - more mailing lists