2009-05-14 05:56:32 +07:00
|
|
|
#ifndef __ASM_GENERIC_BITOPS_H
|
|
|
|
#define __ASM_GENERIC_BITOPS_H
|
2005-04-17 05:20:36 +07: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 05:56:32 +07:00
|
|
|
*
|
2005-04-17 05:20:36 +07:00
|
|
|
* C language equivalents written by Theodore Ts'o, 9/26/92
|
|
|
|
*/
|
|
|
|
|
2009-05-14 05:56:32 +07:00
|
|
|
#include <linux/irqflags.h>
|
|
|
|
#include <linux/compiler.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* clear_bit may not imply a memory barrier
|
|
|
|
*/
|
|
|
|
#ifndef smp_mb__before_clear_bit
|
|
|
|
#define smp_mb__before_clear_bit() smp_mb()
|
|
|
|
#define smp_mb__after_clear_bit() smp_mb()
|
|
|
|
#endif
|
|
|
|
|
2006-03-26 16:39:50 +07:00
|
|
|
#include <asm-generic/bitops/__ffs.h>
|
|
|
|
#include <asm-generic/bitops/ffz.h>
|
|
|
|
#include <asm-generic/bitops/fls.h>
|
2009-05-14 05:56:32 +07:00
|
|
|
#include <asm-generic/bitops/__fls.h>
|
2006-03-26 16:39:50 +07:00
|
|
|
#include <asm-generic/bitops/fls64.h>
|
|
|
|
#include <asm-generic/bitops/find.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2007-10-19 13:40:26 +07:00
|
|
|
#ifndef _LINUX_BITOPS_H
|
|
|
|
#error only <linux/bitops.h> can be included directly
|
|
|
|
#endif
|
|
|
|
|
2006-03-26 16:39:50 +07:00
|
|
|
#include <asm-generic/bitops/sched.h>
|
|
|
|
#include <asm-generic/bitops/ffs.h>
|
|
|
|
#include <asm-generic/bitops/hweight.h>
|
2007-10-18 17:06:39 +07:00
|
|
|
#include <asm-generic/bitops/lock.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2009-05-14 05:56:32 +07: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 06:42:02 +07:00
|
|
|
#include <asm-generic/bitops/le.h>
|
2006-03-26 16:39:50 +07:00
|
|
|
#include <asm-generic/bitops/ext2-atomic.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2009-05-14 05:56:32 +07:00
|
|
|
#endif /* __ASM_GENERIC_BITOPS_H */
|