opnsense-src/sys/conf
Mitchell Horne a89262079e Consistently provide ffs/fls using builtins
Use of compiler builtin ffs/ctz functions will result in optimized
instruction sequences when possible, and fall back to calling a function
provided by the compiler run-time library. We have slowly shifted our
platforms to take advantage of these builtins in 60645781d6 (arm64),
1c76d3a9fb (arm), 9e319462a0 (powerpc, partial).

Some platforms still rely on the libkern implementations of these
functions provided by libkern, namely riscv, powerpc (ffs*, flsll), and
i386 (ffsll and flsll). These routines are slow, as they perform a
linear search for the bit in question. Even on platforms lacking
dedicated bit-search instructions, such as riscv, the compiler library
will provide better-optimized routines, e.g. by using binary search.

Consolidate all definitions of these functions (whether currently using
builtins or not) to libkern.h. This should result in equivalent or
better performing routines in all cases.

One wart in all of this is the existing HAVE_INLINE_F*** macros, which
we use in a few places to conditionally avoid the slow libkern routines.
These aren't easily removed in one commit. For now, provide these
defines unconditionally, but marked for removal after subsequent
cleanup.

Removal of the now unused libkern routines will follow in the next
commit.

Reviewed by:	dougm, imp (previous version)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40698
2023-07-06 14:46:41 -03:00
..
config.mk config.mk: All options in DEFAULTS are now defined in opt_global.h 2022-10-24 12:13:04 -06:00
dtb.build.mk dtb: Be much less verbose in the building of dtb 2022-10-29 10:13:54 -06:00
dtb.mk Allow kernel config to specify DTS/DTSO to build, and out-of-tree support 2019-03-26 02:45:23 +00:00
files zfs: merge openzfs/zfs@feff9dfed 2023-06-10 19:31:17 +02:00
files.amd64 superio+ncthwm: Add hardware monitoring support 2023-07-01 11:19:53 -06:00
files.arm zfs: merge openzfs/zfs@431083f75 2023-04-03 16:49:30 +02:00
files.arm64 arm64: Enable the Hyper-V keyboard driver 2023-06-21 13:17:40 +01:00
files.i386 Consistently provide ffs/fls using builtins 2023-07-06 14:46:41 -03:00
files.powerpc Consistently provide ffs/fls using builtins 2023-07-06 14:46:41 -03:00
files.riscv Consistently provide ffs/fls using builtins 2023-07-06 14:46:41 -03:00
files.x86 ipmi: add Block Transfer interface support 2023-06-07 12:30:47 +03:00
kern.mk sys: Switch the kernel's C standard from C99 to GNU99. 2023-07-01 12:21:13 -07:00
kern.opts.mk kern.opts.mk: rationalize i386 EFI default with src.opts.mk 2023-05-12 11:04:00 -04:00
kern.post.mk kern.post.mk: fix PORTSDIR handling 2023-03-27 13:57:57 +02:00
kern.pre.mk arm64: add KASAN support 2023-03-23 16:34:33 -05:00
kmod.mk sys: Retire OPENZFS_CWARNFLAGS now that it is empty. 2023-03-22 12:35:30 -07:00
kmod.opts.mk Add a kmod.opts.mk. 2019-11-21 18:14:26 +00:00
kmod_syms.awk kmod_syms.awk: fix removal of the export list from the symbol table 2021-11-18 15:56:24 +02:00
kmod_syms_prefix.awk
ldscript.amd64 amd64: do not assume that kernel is loaded at 2M physical 2021-07-31 16:53:42 +03:00
ldscript.arm Eliminate the generated ldscript for arm and arm64, and strip $a/$d marker 2019-12-29 18:17:12 +00:00
ldscript.arm64 arm64: add read_frequently, read_mostluy and exclusive_cache_line to linker script 2021-08-23 15:22:17 +02:00
ldscript.i386 Expose the kernel's build-ID through sysctl 2019-06-04 13:07:10 +00:00
ldscript.kmod.amd64 Move PLTs to the beginning of amd64 kernel modules. 2020-09-16 13:51:47 +00:00
ldscript.kmod.i386 Formalize the use of linker scripts for kernel modules. 2019-10-16 22:19:56 +00:00
ldscript.powerpc [PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities. 2020-05-07 19:32:49 +00:00
ldscript.powerpc64 [PowerPC] Fix build-id note on powerpc64 kernel 2020-06-01 19:40:59 +00:00
ldscript.powerpc64le [PowerPC64LE] Set up powerpc.powerpc64le architecture 2020-09-22 23:49:30 +00:00
ldscript.powerpcspe [PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities. 2020-05-07 19:32:49 +00:00
ldscript.riscv Set the LMA of the riscv kernel to the OpenSBI jump target by default 2020-02-04 00:06:16 +00:00
Makefile.amd64 Clarify DTR_ENABLED make variable 2023-01-12 11:03:49 -04:00
Makefile.arm ipq4018: add TCSR definitions from Linux. 2021-10-18 19:18:01 +00:00
Makefile.arm64 arm64: Use FULLKERNEL instead of .ALLSRC in .bin target 2023-04-18 11:41:57 -04:00
Makefile.i386
Makefile.powerpc Stop adding -Wredundant-decls to CWARNFLAGS. 2022-02-07 12:47:51 -08:00
Makefile.riscv riscv: always include frame pointer 2023-01-12 11:04:24 -04:00
newvers.sh newvers: Use correct regexp 2023-04-21 10:24:25 -06:00
NOTES tslog: Optionally instrument pmap_zero_page 2023-06-04 10:16:31 -07:00
options tcp: With the right options in the kernel cc_cubic stays in slowstart always. 2023-06-28 11:18:47 -04:00
options.amd64 x86: Add MPTABLE_LINUX_BUG_COMPAT option 2022-10-17 23:02:22 -07:00
options.arm arm: Remove useless armv6/armv7 options 2022-10-20 10:48:31 -06:00
options.arm64 arm64: emulate swp/swpb instructions 2023-05-15 10:42:10 -05:00
options.i386 x86: Add MPTABLE_LINUX_BUG_COMPAT option 2022-10-17 23:02:22 -07:00
options.powerpc powerpc/pseries: Allow radix pmap in pseries for ISA 3.0 2021-08-11 19:07:04 -05:00
options.riscv riscv: retire the FPE kernel option 2023-05-02 15:01:31 -03:00
std.nodebug Exclude DEBUG_VFS_LOCKS from non-debug kernel configs 2022-02-02 19:27:32 +02:00
sysent.mk sysent: regenerate files every time 2021-12-16 20:56:28 -06:00
systags.sh Fix kernel-tags target. 2020-01-23 13:56:12 +00:00
vdso_amd64.ldscript spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vdso_amd64_ia32.ldscript spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE retire cp(4) driver 2022-12-13 15:24:52 -05:00