]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Add ASM_BUG()
authorMark Rutland <mark.rutland@arm.com>
Wed, 26 Jul 2017 13:41:40 +0000 (14:41 +0100)
committerMark Rutland <mark.rutland@arm.com>
Tue, 8 Aug 2017 15:28:13 +0000 (16:28 +0100)
commitcf90cfe29ecf4b430845ff3531a7634268043915
tree6ddd759db025175630ec0aef89818f023d1e6ffd
parent8b74f4f4576ba4882ca9e92e5c3794c2476fd0af
arm64: Add ASM_BUG()

Currently. we can only use BUG() from C code, though there are
situations where we would like an equivalent mechanism in assembly code.

This patch refactors our BUG() definition such that it can be used in
either C or assembly, in the form of a new ASM_BUG().

The refactoring requires the removal of escape sequences, such as '\n'
and '\t', but these aren't strictly necessary as we can use ';' to
terminate assembler statements.

The low-level assembly is factored out into <asm/asm-bug.h>, with
<asm/bug.h> retained as the C wrapper.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/asm-bug.h [new file with mode: 0644]
arch/arm64/include/asm/bug.h