opnsense-src/sys/powerpc/booke
Doug Moore feeeb1c7a1 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-18 10:44:00 +01:00
..
booke_machdep.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
locore.S sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
machdep_e500.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
mp_cpudep.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
platform_bare.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
pmap.c libkern: add ilog2 macro 2025-02-18 10:44:00 +01:00
pmap_32.c libkern: add ilog2 macro 2025-02-18 10:44:00 +01:00
pmap_64.c libkern: add ilog2 macro 2025-02-18 10:44:00 +01:00
spe.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
trap_subr.S sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00