Page MenuHomeFreeBSD

arm: Implement kernel IFUNC
ClosedPublic

Authored by mmel on Fri, Jan 30, 3:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Feb 4, 2:12 AM
Unknown Object (File)
Tue, Feb 3, 10:47 PM
Unknown Object (File)
Sat, Jan 31, 8:25 PM
Unknown Object (File)
Sat, Jan 31, 1:17 AM
Unknown Object (File)
Sat, Jan 31, 12:31 AM
Unknown Object (File)
Fri, Jan 30, 11:37 PM
Unknown Object (File)
Fri, Jan 30, 10:53 PM
Subscribers

Details

Summary

Add kernel ifunc support on arm.

MFC after : 3 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mmel requested review of this revision.Fri, Jan 30, 3:42 PM
sys/arm/arm/machdep.c
450

Isn't it too early? I put the sched_instance_select() after init_param1(). This is not strictly necessary now, but makes some amount of tuning knobs initialized before scheduler is selected.

sys/arm/include/ifunc.h
4

You should at least add your copyright there, if not replacing mine/FF altogether.

Also we normally put SPDX tag instead of the license text in modern times.

sys/conf/kern.pre.mk
122

Now that only riscv is the exempt, perhaps change this to check that MACHINE_CPUARCH != riscv instead?

sys/kern/link_elf.c
2044

Similarly, #ifndef riscv ? No strong opinion.

sys/arm/arm/machdep.c
450

It's before init_param1 on amd64, arm64, and riscv. It might be difficult to move later on architectures where the mem* functions are an ifunc.

sys/arm/arm/machdep.c
450

I open-coded several str* functions in sched_instance_select() for this reason.

sys/arm/arm/machdep.c
450

It's the target. I want to use ifunc later also for cache operations and maily for SW/HW divide. So these must be resolved ASAP.

sys/arm/include/ifunc.h
4

I copied it from x86 with minimal changes. It's no problem to steal it :)

sys/conf/kern.pre.mk
122

Oki, I'll change it before commit.

sys/kern/link_elf.c
2044

ditto

sys/arm/include/ifunc.h
4

Please do fix this.
Otherwise, I see no issues with the patch.

This revision was not accepted when it landed; it landed in state Needs Review.Sun, Feb 1, 8:18 AM
This revision was automatically updated to reflect the committed changes.