]> git.baikalelectronics.ru Git - kernel.git/commit
kgdb: Add kgdb_has_hit_break function
authorVincent Chen <vincent.chen@sifive.com>
Thu, 16 Apr 2020 02:38:04 +0000 (10:38 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 18 May 2020 18:38:09 +0000 (11:38 -0700)
commit515adebe0fc8064873fea3bd5a8d36ea812499f1
treee063a9c036c048bbcbd25828f0b1702caa35dba0
parentf6f801fb1c2abdbbd8014608352a4c30995b13af
kgdb: Add kgdb_has_hit_break function

The break instruction in RISC-V does not have an immediate value field, so
the kernel cannot identify the purpose of each trap exception through the
opcode. This makes the existing identification schemes in other
architecture unsuitable for the RISC-V kernel. To solve this problem, this
patch adds kgdb_has_hit_break(), which can help RISC-V kernel identify
the KGDB trap exception.

Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
kernel/debug/debug_core.c