diff options
author | Bart Van Assche <bvanassche@acm.org> | 2018-11-28 15:43:09 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-12 19:47:05 +0100 |
commit | 0105d80dd157963febf91668511b89641393f486 (patch) | |
tree | 4c19ad240fcf7cf8ad89c2ec49942dedb8a663e9 /kernel/time | |
parent | 263b0f92be968a0aee9ebfc1f7479dd7be7346a9 (diff) | |
download | linux-stable-0105d80dd157963febf91668511b89641393f486.tar.gz linux-stable-0105d80dd157963febf91668511b89641393f486.tar.bz2 linux-stable-0105d80dd157963febf91668511b89641393f486.zip |
timekeeping: Use proper seqcount initializer
[ Upstream commit ce10a5b3954f2514af726beb78ed8d7350c5e41c ]
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: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Thomas 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.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/timekeeping.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index f3b22f456fac..7846ce24ecc0 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -50,7 +50,9 @@ enum timekeeping_adv_mode { static struct { seqcount_t seq; struct timekeeper timekeeper; -} tk_core ____cacheline_aligned; +} tk_core ____cacheline_aligned = { + .seq = SEQCNT_ZERO(tk_core.seq), +}; static DEFINE_RAW_SPINLOCK(timekeeper_lock); static struct timekeeper shadow_timekeeper; |