[PATCH v4 12/12] RISC-V: fix auipc-jalr addresses in patched alternatives
Lad, Prabhakar
prabhakar.csengg at gmail.com
Sun Dec 11 12:49:16 PST 2022
On Wed, Dec 7, 2022 at 6:08 PM Heiko Stuebner <heiko at sntech.de> wrote:
>
> From: Heiko Stuebner <heiko.stuebner at vrull.eu>
>
> Alternatives live in a different section, so addresses used by call
> functions will point to wrong locations after the patch got applied.
>
> Similar to arm64, adjust the location to consider that offset.
>
> Signed-off-by: Heiko Stuebner <heiko.stuebner at vrull.eu>
> ---
> arch/riscv/include/asm/alternative.h | 3 ++
> arch/riscv/kernel/alternative.c | 56 ++++++++++++++++++++++++++++
> arch/riscv/kernel/cpufeature.c | 5 ++-
> 3 files changed, 63 insertions(+), 1 deletion(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj at bp.renesas.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj at bp.renesas.com>
Cheers,
Prabhakar
More information about the linux-riscv
mailing list