freebsd-src/sys/powerpc
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
..
aim pmap: Convert boolean_t to bool. 2024-01-31 14:48:26 -08:00
amigaone sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
booke libkern: add ilog2 macro 2024-06-03 11:37:55 -05:00
conf LINT: Don't build bnxt on 32-bit platforms 2024-05-29 10:50:27 -06:00
cpufreq sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
fpu sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
include vm: Simplify startup page dumping conditional 2024-05-25 19:24:55 +02:00
mambo sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
mikrotik sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
mpc85xx new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE 2024-03-13 15:05:54 -07:00
ofw powerpc: Bump maximum number of FDT reserved mem entries 2024-02-28 22:01:15 -05:00
powermac macio: Set resource map size 2024-04-10 22:05:38 -04:00
powernv sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
powerpc uio: Use switch statements when handling UIO_READ vs UIO_WRITE 2024-05-10 13:43:36 -07:00
ps3 new-bus: Remove the 'type' argument from BUS_MAP/UNMAP_RESOURCE 2024-03-13 15:05:54 -07:00
pseries sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
psim new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE 2024-03-13 15:05:54 -07:00