[PATCH -fixes] riscv: Fix RISCV_ALTERNATIVE_EARLY
Conor Dooley
conor at kernel.org
Tue Aug 27 01:38:01 PDT 2024
On Mon, Aug 26, 2024 at 12:57:37PM +0200, Alexandre Ghiti wrote:
> RISCV_ALTERNATIVE_EARLY will issue sbi_ecall() very early in the boot
> process, before the first memory mapping is setup so we can't have any
> instrumentation happening here.
>
> In addition, when the kernel is relocatable, we must also not issue any
> relocation this early since they would have been patched virtually only.
>
> So, instead of disabling instrumentation for the whole kernel/sbi.c file
> and compiling it with -fno-pie, simply move __sbi_ecall() and
> __sbi_base_ecall() into their own file where this is fixed.
IOW, this should fix the issue that we discussed here
https://lore.kernel.org/linux-riscv/abec162e-f3f2-488c-83d9-be17257a5df8@ghiti.fr/
also?
I'm sorry I didn't get to test that yet, we had some pretty bad IT
issues in the office the last weeks and I have been avoiding going
there. I'll try to test this one instead..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240827/38f12cd8/attachment.sig>
More information about the linux-riscv
mailing list