From: "tip-bot2 for Davidlohr Bueso" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Davidlohr Bueso <dbueso@suse.de>,
Thomas Gleixner <tglx@linutronix.de>, x86 <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [tip: timers/core] timekeeping: Convert jiffies_seq to seqcount_raw_spinlock_t
Date: Mon, 26 Oct 2020 10:08:38 -0000 [thread overview]
Message-ID: <160370691856.397.3350703895486263181.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20201021190749.19363-1-dave@stgolabs.net>
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 1a2b85f1e2a93a3f84243e654d225e4088735336
Gitweb: https://git.kernel.org/tip/1a2b85f1e2a93a3f84243e654d225e4088735336
Author: Davidlohr Bueso <dave@stgolabs.net>
AuthorDate: Wed, 21 Oct 2020 12:07:49 -07:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 26 Oct 2020 11:04:14 +01:00
timekeeping: Convert jiffies_seq to seqcount_raw_spinlock_t
Use the new api and associate the seqcounter to the jiffies_lock enabling
lockdep support - although for this particular case the write-side locking
and non-preemptibility are quite obvious.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201021190749.19363-1-dave@stgolabs.net
---
kernel/time/jiffies.c | 3 ++-
kernel/time/timekeeping.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index eddcf49..a5cffe2 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -59,7 +59,8 @@ static struct clocksource clocksource_jiffies = {
};
__cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(jiffies_lock);
-__cacheline_aligned_in_smp seqcount_t jiffies_seq;
+__cacheline_aligned_in_smp seqcount_raw_spinlock_t jiffies_seq =
+ SEQCNT_RAW_SPINLOCK_ZERO(jiffies_seq, &jiffies_lock);
#if (BITS_PER_LONG < 64)
u64 get_jiffies_64(void)
diff --git a/kernel/time/timekeeping.h b/kernel/time/timekeeping.h
index 099737f..6c2cbd9 100644
--- a/kernel/time/timekeeping.h
+++ b/kernel/time/timekeeping.h
@@ -26,7 +26,7 @@ extern void do_timer(unsigned long ticks);
extern void update_wall_time(void);
extern raw_spinlock_t jiffies_lock;
-extern seqcount_t jiffies_seq;
+extern seqcount_raw_spinlock_t jiffies_seq;
#define CS_NAME_LEN 32
prev parent reply other threads:[~2020-10-26 10:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 19:07 [PATCH] " Davidlohr Bueso
2020-10-26 10:08 ` tip-bot2 for Davidlohr Bueso [this message]
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=160370691856.397.3350703895486263181.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=dbueso@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®