Page MenuHomeFreeBSD

linuxkpi: Define `DEFINE_XARRAY*()` macros
ClosedPublic

Authored by dumbbell on Apr 16 2026, 9:08 PM.
Tags
None
Referenced Files
F167602822: D56446.diff
Sun, Aug 23, 1:17 AM
F167601743: D56446.id.diff
Sun, Aug 23, 1:03 AM
Unknown Object (File)
Thu, Aug 13, 1:05 AM
Unknown Object (File)
Mon, Aug 10, 12:32 PM
Unknown Object (File)
Sat, Aug 8, 7:32 PM
Unknown Object (File)
Sat, Aug 8, 7:17 AM
Unknown Object (File)
Sat, Aug 8, 5:55 AM
Unknown Object (File)
Tue, Aug 4, 7:11 AM
Subscribers

Details

Summary

The DEFINE_XARRAY*() macros are used to declare a static xarray.

As the structure embeds a mutex(9), we also need to declare the static mutex after the struct xarray. Thus the slightly awkward definition of DEFINE_XARRAY_FLAGS().

The DRM generic code started to use DEFINE_XARRAY_ALLOC() in Linux 6.12.

This is part of the update of DRM drivers to Linux 6.12.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable