opnsense-src/sys/powerpc
Doug Moore 4ed1837853 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

(cherry picked from commit b0056b31e90029553894d17c441cbb2c06d31412)
2025-02-10 04:27:12 -06:00
..
aim powerpc pmap: initialize kernel pmap radix trie 2023-09-19 21:09:37 -05:00
amigaone sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
booke libkern: add ilog2 macro 2025-02-10 04:27:12 -06:00
conf sys: add conf/std.debug, generic debugging options 2024-10-09 10:44:35 +02:00
cpufreq sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
fpu sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
include atomics: Constify loads 2025-01-16 19:06:53 +01:00
mambo sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
mikrotik sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
mpc85xx mpc85xx: Use device_set_desc() 2024-06-27 11:27:41 -04:00
ofw powerpc: Bump maximum number of FDT reserved mem entries 2024-04-01 22:09:57 -04:00
powermac powerpc: better handling of shutdown flags 2023-12-08 18:02:44 -04:00
powernv powerpc: better handling of shutdown flags 2023-12-08 18:02:44 -04:00
powerpc uio: Use switch statements when handling UIO_READ vs UIO_WRITE 2024-11-30 08:55:57 -05:00
ps3 ps3: add elfv2 support 2024-10-23 22:08:00 -04:00
pseries powerpc: better handling of shutdown flags 2023-12-08 18:02:44 -04:00
psim sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00