]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: xip: support runtime trap patching
authorVitaly Wool <vitaly.wool@konsulko.com>
Mon, 31 May 2021 08:53:42 +0000 (11:53 +0300)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 10 Jun 2021 23:16:06 +0000 (16:16 -0700)
commit5508223763d066c00adbd94abf1c60de1b521d0a
tree521335babc29f534c56570d246aed170ddc26822
parent317934887b862dcc57a4cace9fe42e85a6c84859
riscv: xip: support runtime trap patching

RISCV_ERRATA_ALTERNATIVE patches text at runtime which is currently
not possible when the kernel is executed from the flash in XIP mode.
Since runtime patching concerns only traps at the moment, let's just
have all the traps reside in RAM anyway if RISCV_ERRATA_ALTERNATIVE
is set. Thus, these functions will be patch-able even when the .text
section is in flash.

Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/traps.c
arch/riscv/kernel/vmlinux-xip.lds.S