arm64: prevent potential circular header dependencies in asm/bug.h
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 16 Feb 2016 12:52:34 +0000 (13:52 +0100)
committerAlex Shi <alex.shi@linaro.org>
Wed, 11 May 2016 14:19:26 +0000 (22:19 +0800)
commit2894f328e3bbb808606c82fa1e2ea300089df728
tree265d01678290c970eaad033606a59d7fe4575311
parentb01c68c7494903dca326579248d3757c715b84f8
arm64: prevent potential circular header dependencies in asm/bug.h

Currently, using BUG_ON() in header files is cumbersome, due to the fact
that asm/bug.h transitively includes a lot of other header files, resulting
in the actual BUG_ON() invocation appearing before its definition in the
preprocessor input. So let's reverse the #include dependency between
asm/bug.h and asm/debug-monitors.h, by moving the definition of BUG_BRK_IMM
from the latter to the former. Also fix up one user of asm/debug-monitors.h
which relied on a transitive include.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 03336b1df9929e5d9c28fd9768948b6151cb046c)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
skip arch/arm64/kvm/hyp/debug-sr.c
arch/arm64/include/asm/bug.h
arch/arm64/include/asm/debug-monitors.h