public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* more RELOCATABLE + errata code model issues
@ 2023-09-18 10:36 Conor Dooley
  2023-09-18 15:15 ` Palmer Dabbelt
  0 siblings, 1 reply; 3+ messages in thread
From: Conor Dooley @ 2023-09-18 10:36 UTC (permalink / raw)
  To: Alexandre Ghiti; +Cc: Lad Prabhakar, Palmer Dabbelt, linux-riscv


[-- Attachment #1.1: Type: text/plain, Size: 1278 bytes --]


Hey Alex,

LKP reported [1] some issues with relocatable kernels & code models.
You didn't touch the commit that caused the issues, so you didn't see
the failure report I guess, but Prabhakar is looking for some guidance
on what he should do to resolve the problems. Copy-pasting from his
mail:
> > All errors (new ones prefixed by >>):
> > 
> > >> ld.lld: error: relocation R_RISCV_LO12_I cannot be used against
> > >> symbol 'riscv_cbom_block_size'; recompile with -fPIC
> >    >>> defined in vmlinux.a(arch/riscv/mm/cacheflush.o)
> >    >>> referenced by errata.c
> >    >>>               arch/riscv/errata/andes/errata.o:(andes_errata_patch_func) in archive vmlinux.a
> > 
> I did reproduce this issue locally. The andes errata is not compiled as medany. The config is RELOCATABLE + MEDLOW. I can see the cacheflush.o is compiled with medany flag.
> I can fix the build by adding a medany flag as below:
> +#ifdef CONFIG_RISCV_ALTERNATIVE_EARLY
> +CFLAGS_errata.o := -mcmodel=medany
> #endif
> 
> But I am not sure if this is correct approach. Any pointers on this?

The T-Head errata have something similar, so seems like fair game to me.
Any thoughts?

Thanks,
Conor.

[1] - https://lore.kernel.org/all/202309111311.8tcq3KVc-lkp@intel.com/

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-18 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-18 10:36 more RELOCATABLE + errata code model issues Conor Dooley
2023-09-18 15:15 ` Palmer Dabbelt
2023-09-18 16:59   ` Alexandre Ghiti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox