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>
This commit is contained in:
Vincent Chen 2019-03-05 11:23:33 +08:00 • committed by Palmer Dabbelt
commit d18ebc274c
No known key found for this signature in database
GPG key ID: EF4CA1502CCBAB41