2005-04-16 15:20:36 -07:00
|
|
|
/* asm/bitops.h for Linux/CRIS
|
|
|
|
|
*
|
|
|
|
|
* TODO: asm versions if speed is needed
|
|
|
|
|
*
|
|
|
|
|
* All bit operations return 0 if the bit was cleared before the
|
|
|
|
|
* operation and != 0 if it was not.
|
|
|
|
|
*
|
|
|
|
|
* bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _CRIS_BITOPS_H
|
|
|
|
|
#define _CRIS_BITOPS_H
|
|
|
|
|
|
|
|
|
|
/* Currently this is unsuitable for consumption outside the kernel. */
|
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
|
|
2007-10-18 23:40:26 -07:00
|
|
|
#ifndef _LINUX_BITOPS_H
|
|
|
|
|
#error only <linux/bitops.h> can be included directly
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-10-21 17:45:58 +02:00
|
|
|
#include <arch/bitops.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
#include <linux/compiler.h>
|
2014-03-13 19:00:37 +01:00
|
|
|
#include <asm/barrier.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-02-19 17:53:33 +01:00
|
|
|
#include <asm-generic/bitops/atomic.h>
|
2006-03-26 01:39:21 -08:00
|
|
|
#include <asm-generic/bitops/non-atomic.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Since we define it "external", it collides with the built-in
|
|
|
|
|
* definition, which doesn't have the same semantics. We don't want to
|
|
|
|
|
* use -fno-builtin, so just hide the name ffs.
|
|
|
|
|
*/
|
2014-03-10 15:49:52 -07:00
|
|
|
#define ffs(x) kernel_ffs(x)
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-26 01:39:21 -08:00
|
|
|
#include <asm-generic/bitops/fls.h>
|
2009-01-03 15:37:14 +10:30
|
|
|
#include <asm-generic/bitops/__fls.h>
|
2006-03-26 01:39:21 -08:00
|
|
|
#include <asm-generic/bitops/fls64.h>
|
|
|
|
|
#include <asm-generic/bitops/hweight.h>
|
|
|
|
|
#include <asm-generic/bitops/find.h>
|
2007-10-18 03:06:39 -07:00
|
|
|
#include <asm-generic/bitops/lock.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-03-23 16:42:02 -07:00
|
|
|
#include <asm-generic/bitops/le.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-07-26 16:09:04 -07:00
|
|
|
#include <asm-generic/bitops/ext2-atomic-setbit.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-26 01:39:21 -08:00
|
|
|
#include <asm-generic/bitops/sched.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
|
|
|
|
|
|
#endif /* _CRIS_BITOPS_H */
|