opnsense-src/sys/dev/qat
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
..
include sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
qat libkern: add ilog2 macro 2025-02-10 04:27:12 -06:00
qat_api Fix enum warnings in qat 2024-08-04 12:21:28 +02:00
qat_common kern: Make fileops and filterops tables const where possible 2024-12-03 01:03:42 +00:00
qat_hw qat(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:26 +08:00