Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84038fd9 authored by Will Deacon's avatar Will Deacon Committed by Ingo Molnar
Browse files

locking/atomics/m68k: Don't use <asm-generic/bitops/lock.h>



<asm-generic/bitops/lock.h> is shortly going to be built on top of the
atomic_long_*() API, which introduces a nasty circular dependency for
m68k where <linux/atomic.h> pulls in <linux/bitops.h> via:

	linux/atomic.h
	asm/atomic.h
	linux/irqflags.h
	asm/irqflags.h
	linux/preempt.h
	asm/preempt.h
	asm-generic/preempt.h
	linux/thread_info.h
	asm/thread_info.h
	asm/page.h
	asm-generic/getorder.h
	linux/log2.h
	linux/bitops.h

Since m68k isn't SMP and doesn't support ACQUIRE/RELEASE barriers, we
can just define the lock bitops in terms of the atomic bitops in the
<asm/bitops.h> header.

Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: yamada.masahiro@socionext.com
Link: https://lore.kernel.org/lkml/1529412794-17720-3-git-send-email-will.deacon@arm.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent a70cee97
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -515,12 +515,16 @@ static inline int __fls(int x)


#endif
#endif


/* Simple test-and-set bit locks */
#define test_and_set_bit_lock	test_and_set_bit
#define clear_bit_unlock	clear_bit
#define __clear_bit_unlock	clear_bit_unlock

#include <asm-generic/bitops/ext2-atomic.h>
#include <asm-generic/bitops/ext2-atomic.h>
#include <asm-generic/bitops/le.h>
#include <asm-generic/bitops/le.h>
#include <asm-generic/bitops/fls64.h>
#include <asm-generic/bitops/fls64.h>
#include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/hweight.h>
#include <asm-generic/bitops/hweight.h>
#include <asm-generic/bitops/lock.h>
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */


#endif /* _M68K_BITOPS_H */
#endif /* _M68K_BITOPS_H */