Page MenuHomeFreeBSD

linuxkpi: Define `DEFINE_XARRAY*()` macros
ClosedPublic

Authored by dumbbell on Apr 16 2026, 9:08 PM.
Tags
None
Referenced Files
F171763987: D56446.id176865.diff
Sun, Sep 13, 8:50 AM
Unknown Object (File)
Fri, Sep 11, 5:46 PM
Unknown Object (File)
Tue, Sep 8, 12:09 PM
Unknown Object (File)
Mon, Sep 7, 12:00 PM
Unknown Object (File)
Mon, Sep 7, 3:09 AM
Unknown Object (File)
Sun, Sep 6, 8:49 PM
Unknown Object (File)
Sun, Sep 6, 11:59 AM
Unknown Object (File)
Sun, Sep 6, 1:48 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