All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] asm-generic-atomich-add-atomic_set_mask-helper.patch removed from -mm tree
@ 2011-07-27 19:30 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2011-07-27 19:30 UTC (permalink / raw)
  To: vapier, arnd, asharma, mm-commits


The patch titled
     asm-generic/atomic.h: add atomic_set_mask() helper
has been removed from the -mm tree.  Its filename was
     asm-generic-atomich-add-atomic_set_mask-helper.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: asm-generic/atomic.h: add atomic_set_mask() helper
From: Mike Frysinger <vapier@gentoo.org>

Since arches are expected to implement this guy, add a common version for
people the same way as atomic_clear_mask is handled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Arun Sharma <asharma@fb.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/asm-generic/atomic.h |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff -puN include/asm-generic/atomic.h~asm-generic-atomich-add-atomic_set_mask-helper include/asm-generic/atomic.h
--- a/include/asm-generic/atomic.h~asm-generic-atomich-add-atomic_set_mask-helper
+++ a/include/asm-generic/atomic.h
@@ -157,6 +157,22 @@ static inline void atomic_clear_mask(uns
 	raw_local_irq_restore(flags);
 }
 
+/**
+ * atomic_set_mask - Atomically set bits in atomic variable
+ * @mask: Mask of the bits to be set
+ * @v: pointer of type atomic_t
+ *
+ * Atomically sets the bits set in @mask in @v
+ */
+static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
+{
+	unsigned long flags;
+
+	raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */
+	v->counter |= mask;
+	raw_local_irq_restore(flags);
+}
+
 /* Assume that atomic operations are already serializing */
 #define smp_mb__before_atomic_dec()	barrier()
 #define smp_mb__after_atomic_dec()	barrier()
_

Patches currently in -mm which might be from vapier@gentoo.org are

origin.patch
linux-next.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-27 19:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 19:30 [merged] asm-generic-atomich-add-atomic_set_mask-helper.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.