opnsense-src/sys/compat/linuxkpi/common/include
Doug Moore b0056b31e9 libkern: add ilog2 macro
The kernel source contains several definitions of an ilog2 function;
some are slower than necessary, and one of them is incorrect.
Elimininate them all and define an ilog2 macro in libkern to replace
them, in a way that is fast, correct for all argument types, and, in a
GENERIC kernel, includes a check for an invalid zero parameter.

Folks at Microsoft have verified that having a correct ilog2
definition for their MANA driver doesn't break it.

Reviewed by:	alc, markj, mhorne (older version), jhibbits (older version)
Differential Revision:	https://reviews.freebsd.org/D45170
Differential Revision:	https://reviews.freebsd.org/D45235
2024-06-03 11:37:55 -05:00
..
acpi LinuxKPI: Add acpi_dev_present() function. 2023-12-24 11:20:00 +03:00
asm linuxkpi: Fix set_memory_* 2024-05-03 15:27:29 +02:00
asm-generic linuxkpi: Add io.h 2022-08-08 15:22:35 +02:00
crypto LinuxKPI: add dummy hash.h and kernel_connect() 2023-05-12 11:21:10 +00:00
linux libkern: add ilog2 macro 2024-06-03 11:37:55 -05:00
net LinuxKPI: 802.11: fix for_each_sta_active_link() 2024-05-21 22:12:00 +00:00
video LinuxKPI: Add video/vga.h header 2023-12-24 11:19:58 +03:00
xen LinuxKPI: Add xen/xen.h header 2023-12-24 11:19:58 +03:00
stdarg.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00