riscv: support trap-based WARN()
authorVincent Chen <vincentc@andestech.com>
Tue, 5 Mar 2019 03:23:33 +0000 (11:23 +0800)
committerPalmer Dabbelt <palmer@sifive.com>
Fri, 17 May 2019 03:42:12 +0000 (20:42 -0700)
commitd18ebc274ca78f61094fba39ec9f206d46be5a85
treee965c8d0b50b578f972528461223eec442e7f299
parenta21344dfc6adb78c291a48906478e76e1de08f6d
riscv: support trap-based WARN()

The WARN() related function will trigger a debug exception. This can help
developers to analyze the cause of WARN() because if the debugger is
connected, the control flow will be transferred to debugging
environment.

Signed-off-by: Vincent Chen <vincentc@andestech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/include/asm/bug.h