[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-7a06c41cbec33c6dbe7eec575c61986122617408@git.kernel.org>
Date: Sun, 12 Jan 2014 10:42:38 -0800
From: tip-bot for John Stultz <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
torvalds@...ux-foundation.org, peterz@...radead.org,
sboyd@...eaurora.org, john.stultz@...aro.org, w@....eu,
khalasa@...p.pl, tglx@...utronix.de, u.kleine-koenig@...gutronix.de
Subject: [tip:core/urgent] sched_clock:
Disable seqlock lockdep usage in sched_clock()
Commit-ID: 7a06c41cbec33c6dbe7eec575c61986122617408
Gitweb: http://git.kernel.org/tip/7a06c41cbec33c6dbe7eec575c61986122617408
Author: John Stultz <john.stultz@...aro.org>
AuthorDate: Thu, 2 Jan 2014 15:11:14 -0800
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sun, 12 Jan 2014 10:14:00 +0100
sched_clock: Disable seqlock lockdep usage in sched_clock()
Unfortunately the seqlock lockdep enablement can't be used
in sched_clock(), since the lockdep infrastructure eventually
calls into sched_clock(), which causes a deadlock.
Thus, this patch changes all generic sched_clock() usage
to use the raw_* methods.
Acked-by: Linus Torvalds <torvalds@...ux-foundation.org>
Reviewed-by: Stephen Boyd <sboyd@...eaurora.org>
Reported-by: Krzysztof Hałasa <khalasa@...p.pl>
Signed-off-by: John Stultz <john.stultz@...aro.org>
Cc: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: Willy Tarreau <w@....eu>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/1388704274-5278-2-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/time/sched_clock.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c
index 68b7993..0abb364 100644
--- a/kernel/time/sched_clock.c
+++ b/kernel/time/sched_clock.c
@@ -74,7 +74,7 @@ unsigned long long notrace sched_clock(void)
return cd.epoch_ns;
do {
- seq = read_seqcount_begin(&cd.seq);
+ seq = raw_read_seqcount_begin(&cd.seq);
epoch_cyc = cd.epoch_cyc;
epoch_ns = cd.epoch_ns;
} while (read_seqcount_retry(&cd.seq, seq));
@@ -99,10 +99,10 @@ static void notrace update_sched_clock(void)
cd.mult, cd.shift);
raw_local_irq_save(flags);
- write_seqcount_begin(&cd.seq);
+ raw_write_seqcount_begin(&cd.seq);
cd.epoch_ns = ns;
cd.epoch_cyc = cyc;
- write_seqcount_end(&cd.seq);
+ raw_write_seqcount_end(&cd.seq);
raw_local_irq_restore(flags);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists