162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * PowerPC atomic bit operations.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Merged version by David Gibson <david@gibson.dropbear.id.au>.
662306a36Sopenharmony_ci * Based on ppc64 versions by: Dave Engebretsen, Todd Inglett, Don
762306a36Sopenharmony_ci * Reed, Pat McCarthy, Peter Bergner, Anton Blanchard.  They
862306a36Sopenharmony_ci * originally took it from the ppc32 code.
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * Within a word, bits are numbered LSB first.  Lot's of places make
1162306a36Sopenharmony_ci * this assumption by directly testing bits with (val & (1<<nr)).
1262306a36Sopenharmony_ci * This can cause confusion for large (> 1 word) bitmaps on a
1362306a36Sopenharmony_ci * big-endian system because, unlike little endian, the number of each
1462306a36Sopenharmony_ci * bit depends on the word size.
1562306a36Sopenharmony_ci *
1662306a36Sopenharmony_ci * The bitop functions are defined to work on unsigned longs, so for a
1762306a36Sopenharmony_ci * ppc64 system the bits end up numbered:
1862306a36Sopenharmony_ci *   |63..............0|127............64|191...........128|255...........192|
1962306a36Sopenharmony_ci * and on ppc32:
2062306a36Sopenharmony_ci *   |31.....0|63....32|95....64|127...96|159..128|191..160|223..192|255..224|
2162306a36Sopenharmony_ci *
2262306a36Sopenharmony_ci * There are a few little-endian macros used mostly for filesystem
2362306a36Sopenharmony_ci * bitmaps, these work on similar bit arrays layouts, but
2462306a36Sopenharmony_ci * byte-oriented:
2562306a36Sopenharmony_ci *   |7...0|15...8|23...16|31...24|39...32|47...40|55...48|63...56|
2662306a36Sopenharmony_ci *
2762306a36Sopenharmony_ci * The main difference is that bit 3-5 (64b) or 3-4 (32b) in the bit
2862306a36Sopenharmony_ci * number field needs to be reversed compared to the big-endian bit
2962306a36Sopenharmony_ci * fields. This can be achieved by XOR with 0x38 (64b) or 0x18 (32b).
3062306a36Sopenharmony_ci */
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci#ifndef _ASM_POWERPC_BITOPS_H
3362306a36Sopenharmony_ci#define _ASM_POWERPC_BITOPS_H
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci#ifdef __KERNEL__
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci#ifndef _LINUX_BITOPS_H
3862306a36Sopenharmony_ci#error only <linux/bitops.h> can be included directly
3962306a36Sopenharmony_ci#endif
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci#include <linux/compiler.h>
4262306a36Sopenharmony_ci#include <asm/asm-compat.h>
4362306a36Sopenharmony_ci#include <asm/synch.h>
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci/* PPC bit number conversion */
4662306a36Sopenharmony_ci#define PPC_BITLSHIFT(be)	(BITS_PER_LONG - 1 - (be))
4762306a36Sopenharmony_ci#define PPC_BIT(bit)		(1UL << PPC_BITLSHIFT(bit))
4862306a36Sopenharmony_ci#define PPC_BITMASK(bs, be)	((PPC_BIT(bs) - PPC_BIT(be)) | PPC_BIT(bs))
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci/* Put a PPC bit into a "normal" bit position */
5162306a36Sopenharmony_ci#define PPC_BITEXTRACT(bits, ppc_bit, dst_bit)			\
5262306a36Sopenharmony_ci	((((bits) >> PPC_BITLSHIFT(ppc_bit)) & 1) << (dst_bit))
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci#define PPC_BITLSHIFT32(be)	(32 - 1 - (be))
5562306a36Sopenharmony_ci#define PPC_BIT32(bit)		(1UL << PPC_BITLSHIFT32(bit))
5662306a36Sopenharmony_ci#define PPC_BITMASK32(bs, be)	((PPC_BIT32(bs) - PPC_BIT32(be))|PPC_BIT32(bs))
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci#define PPC_BITLSHIFT8(be)	(8 - 1 - (be))
5962306a36Sopenharmony_ci#define PPC_BIT8(bit)		(1UL << PPC_BITLSHIFT8(bit))
6062306a36Sopenharmony_ci#define PPC_BITMASK8(bs, be)	((PPC_BIT8(bs) - PPC_BIT8(be))|PPC_BIT8(bs))
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci#include <asm/barrier.h>
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci/* Macro for generating the ***_bits() functions */
6562306a36Sopenharmony_ci#define DEFINE_BITOP(fn, op, prefix)		\
6662306a36Sopenharmony_cistatic inline void fn(unsigned long mask,	\
6762306a36Sopenharmony_ci		volatile unsigned long *_p)	\
6862306a36Sopenharmony_ci{						\
6962306a36Sopenharmony_ci	unsigned long old;			\
7062306a36Sopenharmony_ci	unsigned long *p = (unsigned long *)_p;	\
7162306a36Sopenharmony_ci	__asm__ __volatile__ (			\
7262306a36Sopenharmony_ci	prefix					\
7362306a36Sopenharmony_ci"1:"	PPC_LLARX "%0,0,%3,0\n"			\
7462306a36Sopenharmony_ci	#op "%I2 %0,%0,%2\n"			\
7562306a36Sopenharmony_ci	PPC_STLCX "%0,0,%3\n"			\
7662306a36Sopenharmony_ci	"bne- 1b\n"				\
7762306a36Sopenharmony_ci	: "=&r" (old), "+m" (*p)		\
7862306a36Sopenharmony_ci	: "rK" (mask), "r" (p)			\
7962306a36Sopenharmony_ci	: "cc", "memory");			\
8062306a36Sopenharmony_ci}
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ciDEFINE_BITOP(set_bits, or, "")
8362306a36Sopenharmony_ciDEFINE_BITOP(change_bits, xor, "")
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_cistatic __always_inline bool is_rlwinm_mask_valid(unsigned long x)
8662306a36Sopenharmony_ci{
8762306a36Sopenharmony_ci	if (!x)
8862306a36Sopenharmony_ci		return false;
8962306a36Sopenharmony_ci	if (x & 1)
9062306a36Sopenharmony_ci		x = ~x;	// make the mask non-wrapping
9162306a36Sopenharmony_ci	x += x & -x;	// adding the low set bit results in at most one bit set
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci	return !(x & (x - 1));
9462306a36Sopenharmony_ci}
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci#define DEFINE_CLROP(fn, prefix)					\
9762306a36Sopenharmony_cistatic inline void fn(unsigned long mask, volatile unsigned long *_p)	\
9862306a36Sopenharmony_ci{									\
9962306a36Sopenharmony_ci	unsigned long old;						\
10062306a36Sopenharmony_ci	unsigned long *p = (unsigned long *)_p;				\
10162306a36Sopenharmony_ci									\
10262306a36Sopenharmony_ci	if (IS_ENABLED(CONFIG_PPC32) &&					\
10362306a36Sopenharmony_ci	    __builtin_constant_p(mask) && is_rlwinm_mask_valid(~mask)) {\
10462306a36Sopenharmony_ci		asm volatile (						\
10562306a36Sopenharmony_ci			prefix						\
10662306a36Sopenharmony_ci		"1:"	"lwarx	%0,0,%3\n"				\
10762306a36Sopenharmony_ci			"rlwinm	%0,%0,0,%2\n"				\
10862306a36Sopenharmony_ci			"stwcx.	%0,0,%3\n"				\
10962306a36Sopenharmony_ci			"bne- 1b\n"					\
11062306a36Sopenharmony_ci			: "=&r" (old), "+m" (*p)			\
11162306a36Sopenharmony_ci			: "n" (~mask), "r" (p)				\
11262306a36Sopenharmony_ci			: "cc", "memory");				\
11362306a36Sopenharmony_ci	} else {							\
11462306a36Sopenharmony_ci		asm volatile (						\
11562306a36Sopenharmony_ci			prefix						\
11662306a36Sopenharmony_ci		"1:"	PPC_LLARX "%0,0,%3,0\n"				\
11762306a36Sopenharmony_ci			"andc %0,%0,%2\n"				\
11862306a36Sopenharmony_ci			PPC_STLCX "%0,0,%3\n"				\
11962306a36Sopenharmony_ci			"bne- 1b\n"					\
12062306a36Sopenharmony_ci			: "=&r" (old), "+m" (*p)			\
12162306a36Sopenharmony_ci			: "r" (mask), "r" (p)				\
12262306a36Sopenharmony_ci			: "cc", "memory");				\
12362306a36Sopenharmony_ci	}								\
12462306a36Sopenharmony_ci}
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ciDEFINE_CLROP(clear_bits, "")
12762306a36Sopenharmony_ciDEFINE_CLROP(clear_bits_unlock, PPC_RELEASE_BARRIER)
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_cistatic inline void arch_set_bit(int nr, volatile unsigned long *addr)
13062306a36Sopenharmony_ci{
13162306a36Sopenharmony_ci	set_bits(BIT_MASK(nr), addr + BIT_WORD(nr));
13262306a36Sopenharmony_ci}
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_cistatic inline void arch_clear_bit(int nr, volatile unsigned long *addr)
13562306a36Sopenharmony_ci{
13662306a36Sopenharmony_ci	clear_bits(BIT_MASK(nr), addr + BIT_WORD(nr));
13762306a36Sopenharmony_ci}
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_cistatic inline void arch_clear_bit_unlock(int nr, volatile unsigned long *addr)
14062306a36Sopenharmony_ci{
14162306a36Sopenharmony_ci	clear_bits_unlock(BIT_MASK(nr), addr + BIT_WORD(nr));
14262306a36Sopenharmony_ci}
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_cistatic inline void arch_change_bit(int nr, volatile unsigned long *addr)
14562306a36Sopenharmony_ci{
14662306a36Sopenharmony_ci	change_bits(BIT_MASK(nr), addr + BIT_WORD(nr));
14762306a36Sopenharmony_ci}
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci/* Like DEFINE_BITOP(), with changes to the arguments to 'op' and the output
15062306a36Sopenharmony_ci * operands. */
15162306a36Sopenharmony_ci#define DEFINE_TESTOP(fn, op, prefix, postfix, eh)	\
15262306a36Sopenharmony_cistatic inline unsigned long fn(			\
15362306a36Sopenharmony_ci		unsigned long mask,			\
15462306a36Sopenharmony_ci		volatile unsigned long *_p)		\
15562306a36Sopenharmony_ci{							\
15662306a36Sopenharmony_ci	unsigned long old, t;				\
15762306a36Sopenharmony_ci	unsigned long *p = (unsigned long *)_p;		\
15862306a36Sopenharmony_ci	__asm__ __volatile__ (				\
15962306a36Sopenharmony_ci	prefix						\
16062306a36Sopenharmony_ci"1:"	PPC_LLARX "%0,0,%3,%4\n"			\
16162306a36Sopenharmony_ci	#op "%I2 %1,%0,%2\n"				\
16262306a36Sopenharmony_ci	PPC_STLCX "%1,0,%3\n"				\
16362306a36Sopenharmony_ci	"bne- 1b\n"					\
16462306a36Sopenharmony_ci	postfix						\
16562306a36Sopenharmony_ci	: "=&r" (old), "=&r" (t)			\
16662306a36Sopenharmony_ci	: "rK" (mask), "r" (p), "n" (eh)		\
16762306a36Sopenharmony_ci	: "cc", "memory");				\
16862306a36Sopenharmony_ci	return (old & mask);				\
16962306a36Sopenharmony_ci}
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ciDEFINE_TESTOP(test_and_set_bits, or, PPC_ATOMIC_ENTRY_BARRIER,
17262306a36Sopenharmony_ci	      PPC_ATOMIC_EXIT_BARRIER, 0)
17362306a36Sopenharmony_ciDEFINE_TESTOP(test_and_set_bits_lock, or, "",
17462306a36Sopenharmony_ci	      PPC_ACQUIRE_BARRIER, IS_ENABLED(CONFIG_PPC64))
17562306a36Sopenharmony_ciDEFINE_TESTOP(test_and_change_bits, xor, PPC_ATOMIC_ENTRY_BARRIER,
17662306a36Sopenharmony_ci	      PPC_ATOMIC_EXIT_BARRIER, 0)
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_cistatic inline unsigned long test_and_clear_bits(unsigned long mask, volatile unsigned long *_p)
17962306a36Sopenharmony_ci{
18062306a36Sopenharmony_ci	unsigned long old, t;
18162306a36Sopenharmony_ci	unsigned long *p = (unsigned long *)_p;
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci	if (IS_ENABLED(CONFIG_PPC32) &&
18462306a36Sopenharmony_ci	    __builtin_constant_p(mask) && is_rlwinm_mask_valid(~mask)) {
18562306a36Sopenharmony_ci		asm volatile (
18662306a36Sopenharmony_ci			PPC_ATOMIC_ENTRY_BARRIER
18762306a36Sopenharmony_ci		"1:"	"lwarx %0,0,%3\n"
18862306a36Sopenharmony_ci			"rlwinm	%1,%0,0,%2\n"
18962306a36Sopenharmony_ci			"stwcx. %1,0,%3\n"
19062306a36Sopenharmony_ci			"bne- 1b\n"
19162306a36Sopenharmony_ci			PPC_ATOMIC_EXIT_BARRIER
19262306a36Sopenharmony_ci			: "=&r" (old), "=&r" (t)
19362306a36Sopenharmony_ci			: "n" (~mask), "r" (p)
19462306a36Sopenharmony_ci			: "cc", "memory");
19562306a36Sopenharmony_ci	} else {
19662306a36Sopenharmony_ci		asm volatile (
19762306a36Sopenharmony_ci			PPC_ATOMIC_ENTRY_BARRIER
19862306a36Sopenharmony_ci		"1:"	PPC_LLARX "%0,0,%3,0\n"
19962306a36Sopenharmony_ci			"andc	%1,%0,%2\n"
20062306a36Sopenharmony_ci			PPC_STLCX "%1,0,%3\n"
20162306a36Sopenharmony_ci			"bne- 1b\n"
20262306a36Sopenharmony_ci			PPC_ATOMIC_EXIT_BARRIER
20362306a36Sopenharmony_ci			: "=&r" (old), "=&r" (t)
20462306a36Sopenharmony_ci			: "r" (mask), "r" (p)
20562306a36Sopenharmony_ci			: "cc", "memory");
20662306a36Sopenharmony_ci	}
20762306a36Sopenharmony_ci
20862306a36Sopenharmony_ci	return (old & mask);
20962306a36Sopenharmony_ci}
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_cistatic inline int arch_test_and_set_bit(unsigned long nr,
21262306a36Sopenharmony_ci					volatile unsigned long *addr)
21362306a36Sopenharmony_ci{
21462306a36Sopenharmony_ci	return test_and_set_bits(BIT_MASK(nr), addr + BIT_WORD(nr)) != 0;
21562306a36Sopenharmony_ci}
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_cistatic inline int arch_test_and_set_bit_lock(unsigned long nr,
21862306a36Sopenharmony_ci					     volatile unsigned long *addr)
21962306a36Sopenharmony_ci{
22062306a36Sopenharmony_ci	return test_and_set_bits_lock(BIT_MASK(nr),
22162306a36Sopenharmony_ci				addr + BIT_WORD(nr)) != 0;
22262306a36Sopenharmony_ci}
22362306a36Sopenharmony_ci
22462306a36Sopenharmony_cistatic inline int arch_test_and_clear_bit(unsigned long nr,
22562306a36Sopenharmony_ci					  volatile unsigned long *addr)
22662306a36Sopenharmony_ci{
22762306a36Sopenharmony_ci	return test_and_clear_bits(BIT_MASK(nr), addr + BIT_WORD(nr)) != 0;
22862306a36Sopenharmony_ci}
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_cistatic inline int arch_test_and_change_bit(unsigned long nr,
23162306a36Sopenharmony_ci					   volatile unsigned long *addr)
23262306a36Sopenharmony_ci{
23362306a36Sopenharmony_ci	return test_and_change_bits(BIT_MASK(nr), addr + BIT_WORD(nr)) != 0;
23462306a36Sopenharmony_ci}
23562306a36Sopenharmony_ci
23662306a36Sopenharmony_ci#ifdef CONFIG_PPC64
23762306a36Sopenharmony_cistatic inline unsigned long
23862306a36Sopenharmony_ciclear_bit_unlock_return_word(int nr, volatile unsigned long *addr)
23962306a36Sopenharmony_ci{
24062306a36Sopenharmony_ci	unsigned long old, t;
24162306a36Sopenharmony_ci	unsigned long *p = (unsigned long *)addr + BIT_WORD(nr);
24262306a36Sopenharmony_ci	unsigned long mask = BIT_MASK(nr);
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci	__asm__ __volatile__ (
24562306a36Sopenharmony_ci	PPC_RELEASE_BARRIER
24662306a36Sopenharmony_ci"1:"	PPC_LLARX "%0,0,%3,0\n"
24762306a36Sopenharmony_ci	"andc %1,%0,%2\n"
24862306a36Sopenharmony_ci	PPC_STLCX "%1,0,%3\n"
24962306a36Sopenharmony_ci	"bne- 1b\n"
25062306a36Sopenharmony_ci	: "=&r" (old), "=&r" (t)
25162306a36Sopenharmony_ci	: "r" (mask), "r" (p)
25262306a36Sopenharmony_ci	: "cc", "memory");
25362306a36Sopenharmony_ci
25462306a36Sopenharmony_ci	return old;
25562306a36Sopenharmony_ci}
25662306a36Sopenharmony_ci
25762306a36Sopenharmony_ci/*
25862306a36Sopenharmony_ci * This is a special function for mm/filemap.c
25962306a36Sopenharmony_ci * Bit 7 corresponds to PG_waiters.
26062306a36Sopenharmony_ci */
26162306a36Sopenharmony_ci#define arch_clear_bit_unlock_is_negative_byte(nr, addr)		\
26262306a36Sopenharmony_ci	(clear_bit_unlock_return_word(nr, addr) & BIT_MASK(7))
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci#endif /* CONFIG_PPC64 */
26562306a36Sopenharmony_ci
26662306a36Sopenharmony_ci#include <asm-generic/bitops/non-atomic.h>
26762306a36Sopenharmony_ci
26862306a36Sopenharmony_cistatic inline void arch___clear_bit_unlock(int nr, volatile unsigned long *addr)
26962306a36Sopenharmony_ci{
27062306a36Sopenharmony_ci	__asm__ __volatile__(PPC_RELEASE_BARRIER "" ::: "memory");
27162306a36Sopenharmony_ci	__clear_bit(nr, addr);
27262306a36Sopenharmony_ci}
27362306a36Sopenharmony_ci
27462306a36Sopenharmony_ci/*
27562306a36Sopenharmony_ci * Return the zero-based bit position (LE, not IBM bit numbering) of
27662306a36Sopenharmony_ci * the most significant 1-bit in a double word.
27762306a36Sopenharmony_ci */
27862306a36Sopenharmony_ci#define __ilog2(x)	ilog2(x)
27962306a36Sopenharmony_ci
28062306a36Sopenharmony_ci#include <asm-generic/bitops/ffz.h>
28162306a36Sopenharmony_ci
28262306a36Sopenharmony_ci#include <asm-generic/bitops/builtin-__ffs.h>
28362306a36Sopenharmony_ci
28462306a36Sopenharmony_ci#include <asm-generic/bitops/builtin-ffs.h>
28562306a36Sopenharmony_ci
28662306a36Sopenharmony_ci/*
28762306a36Sopenharmony_ci * fls: find last (most-significant) bit set.
28862306a36Sopenharmony_ci * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
28962306a36Sopenharmony_ci */
29062306a36Sopenharmony_cistatic __always_inline int fls(unsigned int x)
29162306a36Sopenharmony_ci{
29262306a36Sopenharmony_ci	int lz;
29362306a36Sopenharmony_ci
29462306a36Sopenharmony_ci	if (__builtin_constant_p(x))
29562306a36Sopenharmony_ci		return x ? 32 - __builtin_clz(x) : 0;
29662306a36Sopenharmony_ci	asm("cntlzw %0,%1" : "=r" (lz) : "r" (x));
29762306a36Sopenharmony_ci	return 32 - lz;
29862306a36Sopenharmony_ci}
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ci#include <asm-generic/bitops/builtin-__fls.h>
30162306a36Sopenharmony_ci
30262306a36Sopenharmony_ci/*
30362306a36Sopenharmony_ci * 64-bit can do this using one cntlzd (count leading zeroes doubleword)
30462306a36Sopenharmony_ci * instruction; for 32-bit we use the generic version, which does two
30562306a36Sopenharmony_ci * 32-bit fls calls.
30662306a36Sopenharmony_ci */
30762306a36Sopenharmony_ci#ifdef CONFIG_PPC64
30862306a36Sopenharmony_cistatic __always_inline int fls64(__u64 x)
30962306a36Sopenharmony_ci{
31062306a36Sopenharmony_ci	int lz;
31162306a36Sopenharmony_ci
31262306a36Sopenharmony_ci	if (__builtin_constant_p(x))
31362306a36Sopenharmony_ci		return x ? 64 - __builtin_clzll(x) : 0;
31462306a36Sopenharmony_ci	asm("cntlzd %0,%1" : "=r" (lz) : "r" (x));
31562306a36Sopenharmony_ci	return 64 - lz;
31662306a36Sopenharmony_ci}
31762306a36Sopenharmony_ci#else
31862306a36Sopenharmony_ci#include <asm-generic/bitops/fls64.h>
31962306a36Sopenharmony_ci#endif
32062306a36Sopenharmony_ci
32162306a36Sopenharmony_ci#ifdef CONFIG_PPC64
32262306a36Sopenharmony_ciunsigned int __arch_hweight8(unsigned int w);
32362306a36Sopenharmony_ciunsigned int __arch_hweight16(unsigned int w);
32462306a36Sopenharmony_ciunsigned int __arch_hweight32(unsigned int w);
32562306a36Sopenharmony_ciunsigned long __arch_hweight64(__u64 w);
32662306a36Sopenharmony_ci#include <asm-generic/bitops/const_hweight.h>
32762306a36Sopenharmony_ci#else
32862306a36Sopenharmony_ci#include <asm-generic/bitops/hweight.h>
32962306a36Sopenharmony_ci#endif
33062306a36Sopenharmony_ci
33162306a36Sopenharmony_ci/* wrappers that deal with KASAN instrumentation */
33262306a36Sopenharmony_ci#include <asm-generic/bitops/instrumented-atomic.h>
33362306a36Sopenharmony_ci#include <asm-generic/bitops/instrumented-lock.h>
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_ci/* Little-endian versions */
33662306a36Sopenharmony_ci#include <asm-generic/bitops/le.h>
33762306a36Sopenharmony_ci
33862306a36Sopenharmony_ci/* Bitmap functions for the ext2 filesystem */
33962306a36Sopenharmony_ci
34062306a36Sopenharmony_ci#include <asm-generic/bitops/ext2-atomic-setbit.h>
34162306a36Sopenharmony_ci
34262306a36Sopenharmony_ci#include <asm-generic/bitops/sched.h>
34362306a36Sopenharmony_ci
34462306a36Sopenharmony_ci#endif /* __KERNEL__ */
34562306a36Sopenharmony_ci
34662306a36Sopenharmony_ci#endif /* _ASM_POWERPC_BITOPS_H */
347