Commit c36ff4e8 authored by Bart Van Assche's avatar Bart Van Assche Committed by Stefan Bader

timekeeping: Use proper seqcount initializer

BugLink: https://bugs.launchpad.net/bugs/1818813

[ Upstream commit ce10a5b3 ]

tk_core.seq is initialized open coded, but that misses to initialize the
lockdep map when lockdep is enabled. Lockdep splats involving tk_core seq
consequently lack a name and are hard to read.

Use the proper initializer which takes care of the lockdep map
initialization.

[ tglx: Massaged changelog ]
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: peterz@infradead.org
Cc: tj@kernel.org
Cc: johannes.berg@intel.com
Link: https://lkml.kernel.org/r/20181128234325.110011-12-bvanassche@acm.orgSigned-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent f90bd3e7
...@@ -39,7 +39,9 @@ ...@@ -39,7 +39,9 @@
static struct { static struct {
seqcount_t seq; seqcount_t seq;
struct timekeeper timekeeper; struct timekeeper timekeeper;
} tk_core ____cacheline_aligned; } tk_core ____cacheline_aligned = {
.seq = SEQCNT_ZERO(tk_core.seq),
};
static DEFINE_RAW_SPINLOCK(timekeeper_lock); static DEFINE_RAW_SPINLOCK(timekeeper_lock);
static struct timekeeper shadow_timekeeper; static struct timekeeper shadow_timekeeper;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment