riscv: Return to previous privilege level after trap handling
authorBin Meng <bmeng.cn@gmail.com>
Wed, 12 Dec 2018 14:12:43 +0000 (06:12 -0800)
committerAndes <uboot@andestech.com>
Tue, 18 Dec 2018 01:56:27 +0000 (09:56 +0800)
commit10753ef8fd14dfe1d41ec253966569de19463adc
tree172dde763aa535bab9a515bcb90de35da1196e57
parent496262cca63f25408c6715b39cea1747e8ce9b59
riscv: Return to previous privilege level after trap handling

At present the trap handler returns to hardcoded M-mode/S-mode.
Change to returning to previous privilege level instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
arch/riscv/cpu/mtrap.S