opnsense-src/sys/compat/linuxkpi/common/include
Olivier Certner 986edb19a4
LinuxKPI: Have kvzalloc() rely on kvmalloc(), not kmalloc()
Since commit 19df0c5abc ("LinuxKPI: make __kmalloc() play by the
rules"), kmalloc() systematically allocates contiguous physical memory,
as it should.  However, kvzalloc() was left defined in terms of
kmalloc(), which makes it allocate contiguous physical memory too.  This
is a too stringent restriction, as kvzalloc() is supposed to be a simple
page-zeroing wrapper around kvmalloc().

According to Linux's documentation ("memory-allocation.rst"), kvmalloc()
first tries to allocate contiguous memory, falling back to
non-contiguous one if that fails.  Thus, callers are already supposed to
deal with the possibility of non-contiguous memory being returned.

Reviewed by:    bz
Fixes:          19df0c5abc ("LinuxKPI: make __kmalloc() play by the rules")
MFC after:      10 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D51247
2025-07-13 15:46:49 +09:00
..
acpi LinuxKPI: acpi: add acpi_evaluate_dsm() 2025-07-04 03:22:22 +00:00
asm LinuxKPI: Add smp_store_release and smp_load_acquire functions 2024-06-26 23:44:37 +03: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 LinuxKPI: Have kvzalloc() rely on kvmalloc(), not kmalloc() 2025-07-13 15:46:49 +09:00
net net80211: LinuxKPI: migrate HE defines to net80211, put correct values 2025-06-09 21:44:26 +00:00
video linuxkpi: Include <linux/{types,io}.h> from <video/vga.h> 2025-01-31 17:00:48 +01:00
xen LinuxKPI: Add xen/xen.h header 2023-12-24 11:19:58 +03:00
stdarg.h machine/stdarg.h -> sys/stdarg.h 2025-06-11 17:39:02 +01:00