From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>, John Kacur <jkacur@redhat.com>
Subject: [PATCH RT 04/25][RFC 3.0.23-rt39-rc1] revert-seqlock-remove-unused-functions
Date: Tue, 06 Mar 2012 11:16:40 -0500 [thread overview]
Message-ID: <20120306161945.770871645@goodmis.org> (raw)
In-Reply-To: 20120306161636.491172179@goodmis.org
[-- Attachment #1: 0004-revert-seqlock-remove-unused-functions.patch --]
[-- Type: text/plain, Size: 1499 bytes --]
From: Steven Rostedt <rostedt@goodmis.org>
revert: seqlock-remove-unused-functions.patch
Revert:
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Sat Jul 16 18:38:22 2011 +0200
seqlock-remove-unused-functions.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/seqlock.h | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index b990f6e..c6db9fb 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -69,6 +69,17 @@ static inline void write_sequnlock(seqlock_t *sl)
spin_unlock(&sl->lock);
}
+static inline int write_tryseqlock(seqlock_t *sl)
+{
+ int ret = spin_trylock(&sl->lock);
+
+ if (ret) {
+ ++sl->sequence;
+ smp_wmb();
+ }
+ return ret;
+}
+
/* Start of read calculation -- fetch last complete writer token */
static __always_inline unsigned read_seqbegin(const seqlock_t *sl)
{
@@ -237,4 +248,14 @@ static inline void write_seqcount_barrier(seqcount_t *s)
#define write_sequnlock_bh(lock) \
do { write_sequnlock(lock); local_bh_enable(); } while(0)
+#define read_seqbegin_irqsave(lock, flags) \
+ ({ local_irq_save(flags); read_seqbegin(lock); })
+
+#define read_seqretry_irqrestore(lock, iv, flags) \
+ ({ \
+ int ret = read_seqretry(lock, iv); \
+ local_irq_restore(flags); \
+ ret; \
+ })
+
#endif /* __LINUX_SEQLOCK_H */
--
1.7.8.3
next prev parent reply other threads:[~2012-03-06 16:16 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 16:16 [PATCH RT 00/25][RFC 3.0.23-rt39-rc1] [ANNOUNCE] 3.0.23-rt39-rc1 release cycle Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 01/25][RFC 3.0.23-rt39-rc1] revert-convert-xtime_lock-to-raw_seqlock Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 02/25][RFC 3.0.23-rt39-rc1] revert-seqlock-create-raw_seqlock Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 03/25][RFC 3.0.23-rt39-rc1] revert-seqlock-use-seqcount Steven Rostedt
2012-03-06 16:16 ` Steven Rostedt [this message]
2012-03-06 22:39 ` [PATCH RT 04/25][RFC 3.0.23-rt39-rc1] revert-seqlock-remove-unused-functions John Kacur
2012-03-06 22:42 ` Thomas Gleixner
2012-03-06 16:16 ` [PATCH RT 05/25][RFC 3.0.23-rt39-rc1] x86-64-remove-vsyscall-number-3 Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 06/25][RFC 3.0.23-rt39-rc1] x86-64-emulate-legacy-vsyscalls Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 07/25][RFC 3.0.23-rt39-rc1] x86: vdso: Remove bogus locking in update_vsyscall_tz() Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 08/25][RFC 3.0.23-rt39-rc1] x86: vdso: Use seqcount instead of seqlock Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 09/25][RFC 3.0.23-rt39-rc1] ia64: vsyscall: " Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 10/25][RFC 3.0.23-rt39-rc1] seqlock: Remove unused functions Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 11/25][RFC 3.0.23-rt39-rc1] seqlock: Use seqcount Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 12/25][RFC 3.0.23-rt39-rc1] seqlock: Provide seq_spin_* functions Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 13/25][RFC 3.0.23-rt39-rc1] fs: fs_struct use seqlock Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 14/25][RFC 3.0.23-rt39-rc1] fs: dentry " Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 15/25][RFC 3.0.23-rt39-rc1] timekeeping: Split xtime_lock Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 16/25][RFC 3.0.23-rt39-rc1] seqlock: Prevent rt starvation Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 17/25][RFC 3.0.23-rt39-rc1] fs: Protect open coded isize seqcount Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 18/25][RFC 3.0.23-rt39-rc1] net: u64_stat: Protect seqcount Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 19/25][RFC 3.0.23-rt39-rc1] timer: Fix hotplug for -rt Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 20/25][RFC 3.0.23-rt39-rc1] futex/rt: Fix possible lockup when taking pi_lock in proxy handler Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 21/25][RFC 3.0.23-rt39-rc1] ring-buffer/rt: Check for irqs disabled before grabbing reader lock Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 22/25][RFC 3.0.23-rt39-rc1] sched/rt: Fix wait_task_interactive() to test rt_spin_lock state Steven Rostedt
2012-03-06 16:16 ` [PATCH RT 23/25][RFC 3.0.23-rt39-rc1] lglock/rt: Use non-rt for_each_cpu() in -rt code Steven Rostedt
2012-03-06 16:17 ` [PATCH RT 24/25][RFC 3.0.23-rt39-rc1] cpu: Make hotplug.lock a "sleeping" spinlock on RT Steven Rostedt
2012-03-06 16:17 ` [PATCH RT 25/25][RFC 3.0.23-rt39-rc1] Linux 3.0.23-rt39-rc1 Steven Rostedt
2012-03-06 22:20 ` [PATCH RT 00/25][RFC 3.0.23-rt39-rc1] [ANNOUNCE] 3.0.23-rt39-rc1 release cycle Steven Rostedt
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=20120306161945.770871645@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).