locking/atomics/m68k: Don't use <asm-generic/bitops/lock.h>
authorWill Deacon <will.deacon@arm.com>
Tue, 19 Jun 2018 12:53:07 +0000 (13:53 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 21 Jun 2018 10:52:11 +0000 (12:52 +0200)
commit84038fd98e8e03ec418e3244b98eb248c5349d7e
treefe1ab32b543e23796ca1b6cb9b5b45dbddae8a4e
parenta70cee9737802654bbbddec027d1d57b7ff24a2c
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: Will Deacon <will.deacon@arm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Peter 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: Ingo Molnar <mingo@kernel.org>
arch/m68k/include/asm/bitops.h