2009-05-14 00:56:32 +02:00
|
|
|
#ifndef __ASM_GENERIC_BITOPS_H
|
|
|
|
#define __ASM_GENERIC_BITOPS_H
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* For the benefit of those who are trying to port Linux to another
|
|
|
|
* architecture, here are some C-language equivalents. You should
|
|
|
|
* recode these in the native assembly language, if at all possible.
|
2009-05-14 00:56:32 +02:00
|
|
|
*
|
2005-04-17 00:20:36 +02:00
|
|
|
* C language equivalents written by Theodore Ts'o, 9/26/92
|
|
|
|
*/
|
|
|
|
|
2009-05-14 00:56:32 +02:00
|
|
|
#include <linux/irqflags.h>
|
|
|
|
#include <linux/compiler.h>
|
arch: Prepare for smp_mb__{before,after}_atomic()
Since the smp_mb__{before,after}*() ops are fundamentally dependent on
how an arch can implement atomics it doesn't make sense to have 3
variants of them. They must all be the same.
Furthermore, the 3 variants suggest they're only valid for those 3
atomic ops, while we have many more where they could be applied.
So move away from
smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}() and reduce the
interface to just the two: smp_mb__{before,after}_atomic().
This patch prepares the way by introducing default implementations in
asm-generic/barrier.h that default to a full barrier and providing
__deprecated inlines for the previous 6 barriers if they're not
provided by the arch.
This should allow for a mostly painless transition (lots of deprecated
warns in the interim).
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-wr59327qdyi9mbzn6x937s4e@git.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Chen, Gong" <gong.chen@linux.intel.com>
Cc: John Sullivan <jsrhbz@kanargh.force9.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-02-06 18:16:07 +01:00
|
|
|
#include <asm/barrier.h>
|
2009-05-14 00:56:32 +02:00
|
|
|
|
2006-03-26 11:39:50 +02:00
|
|
|
#include <asm-generic/bitops/__ffs.h>
|
|
|
|
#include <asm-generic/bitops/ffz.h>
|
|
|
|
#include <asm-generic/bitops/fls.h>
|
2009-05-14 00:56:32 +02:00
|
|
|
#include <asm-generic/bitops/__fls.h>
|
2006-03-26 11:39:50 +02:00
|
|
|
#include <asm-generic/bitops/fls64.h>
|
|
|
|
#include <asm-generic/bitops/find.h>
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2007-10-19 08:40:26 +02:00
|
|
|
#ifndef _LINUX_BITOPS_H
|
|
|
|
#error only <linux/bitops.h> can be included directly
|
|
|
|
#endif
|
|
|
|
|
2006-03-26 11:39:50 +02:00
|
|
|
#include <asm-generic/bitops/sched.h>
|
|
|
|
#include <asm-generic/bitops/ffs.h>
|
|
|
|
#include <asm-generic/bitops/hweight.h>
|
2007-10-18 12:06:39 +02:00
|
|
|
#include <asm-generic/bitops/lock.h>
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2009-05-14 00:56:32 +02:00
|
|
|
#include <asm-generic/bitops/atomic.h>
|
|
|
|
#include <asm-generic/bitops/non-atomic.h>
|
bitops: introduce little-endian bitops for most architectures
Introduce little-endian bit operations to the big-endian architectures
which do not have native little-endian bit operations and the
little-endian architectures. (alpha, avr32, blackfin, cris, frv, h8300,
ia64, m32r, mips, mn10300, parisc, sh, sparc, tile, x86, xtensa)
These architectures can just include generic implementation
(asm-generic/bitops/le.h).
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <willy@debian.org>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Chris Zankel <chris@zankel.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-24 00:42:02 +01:00
|
|
|
#include <asm-generic/bitops/le.h>
|
2006-03-26 11:39:50 +02:00
|
|
|
#include <asm-generic/bitops/ext2-atomic.h>
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2009-05-14 00:56:32 +02:00
|
|
|
#endif /* __ASM_GENERIC_BITOPS_H */
|