]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: insn: remove BUG_ON from codegen
authorZi Shen Lim <zlim.lnx@gmail.com>
Thu, 14 Jan 2016 07:33:21 +0000 (23:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jan 2016 00:15:26 +0000 (19:15 -0500)
commit561c96acdb08a9adbb8531e1cc3b610566a064b8
treee0041c10278e7105b9979a3aac92eda349559db4
parent1925325a1599f2cce09e8e64e16800174e1b03f5
arm64: insn: remove BUG_ON from codegen

During code generation, we used to BUG_ON unknown/unsupported encoding
or invalid parameters.

Instead, now we report these as errors and simply return the
instruction AARCH64_BREAK_FAULT. Users of these codegen helpers should
check for and handle this failure condition as appropriate.

Otherwise, unhandled codegen failure will result in trapping at
run-time due to AARCH64_BREAK_FAULT, which is arguably better than a
BUG_ON.

Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/arm64/kernel/insn.c