riscv: add macro to get instruction length
authorZong Li <zong.li@sifive.com>
Mon, 9 Mar 2020 16:55:42 +0000 (00:55 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 26 Mar 2020 16:24:49 +0000 (09:24 -0700)
commitb42d763a2d412d6ef7c29cb2f1b3e9985e2b1e38
treeec1aaa9c051806f02bf08ae62e66a93302b3c64a
parentd27c3c90817e4c5ea655714065a725b4abd576f9
riscv: add macro to get instruction length

Extract the calculation of instruction length for common use.

Signed-off-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/bug.h
arch/riscv/kernel/traps.c