On Wed, 2007-10-17 at 11:34 -0400, Steven Rostedt wrote:I took out the nop , and just did a save flags which makes sense.. There is still more cleanup to do in that regard. Signed-off-by: Daniel Walker <dwalker@mvista.com> --- include/linux/seqlock.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) Index: linux-2.6.23/include/linux/seqlock.h =================================================================== --- linux-2.6.23.orig/include/linux/seqlock.h +++ linux-2.6.23/include/linux/seqlock.h @@ -92,8 +92,11 @@ static inline void __write_seqlock(seqlo static __always_inline unsigned long __write_seqlock_irqsave(seqlock_t *sl) { + unsigned long flags; + + local_save_flags(flags); __write_seqlock(sl); - return 0; + return flags; } static inline void __write_sequnlock(seqlock_t *sl) @@ -280,26 +283,27 @@ do { \ PICK_SEQ_OP(__write_sequnlock_irq_raw, __write_sequnlock, lock) static __always_inline -unsigned long __read_seqbegin_irqsave_raw(raw_seqlock_t *sl) +unsigned long __seq_irqsave_raw(raw_seqlock_t *sl) { unsigned long flags; local_irq_save(flags); - __read_seqbegin_raw(sl); return flags; } -static __always_inline unsigned long __read_seqbegin_irqsave(seqlock_t *sl) +static __always_inline unsigned long __seq_irqsave(seqlock_t *sl) { - __read_seqbegin(sl); - return 0; + unsigned long flags; + + local_save_flags(flags); + return flags; } -#define read_seqbegin_irqsave(lock, flags) \ -do { \ - flags = PICK_SEQ_OP_RET(__read_seqbegin_irqsave_raw, \ - __read_seqbegin_irqsave, lock); \ -} while (0) +#define read_seqbegin_irqsave(lock, flags) \ +({ \ + flags = PICK_SEQ_OP_RET(__seq_irqsave_raw, __seq_irqsave, lock);\ + read_seqbegin(lock); \ +}) static __always_inline int __read_seqretry_irqrestore(seqlock_t *sl, unsigned iv, unsigned long flags) -
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Willy Tarreau | Re: Linux 2.6.21 |
| Jan Kundrát | kswapd high CPU usage with no swap |
git: | |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] tcp: splice as many packets as possible at once |
