]> 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)
commit46fe5a8453a73529535ae7b520f622f69792f1cd
tree521335babc29f534c56570d246aed170ddc26822
parent6cfa9c52d5a3fbb85cea976c2ffa7d75fd4443b6
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