From b73929ac1ec6049ed241c039b31436332c6b3556 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 1 Oct 2024 06:19:39 +0000 Subject: [PATCH] add DEFINE_XARRAY_ALLOC for 6.6.53 drm --- sys/dev/pci/drm/include/linux/xarray.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/pci/drm/include/linux/xarray.h b/sys/dev/pci/drm/include/linux/xarray.h index fd643058fc3..a48a295a88d 100644 --- a/sys/dev/pci/drm/include/linux/xarray.h +++ b/sys/dev/pci/drm/include/linux/xarray.h @@ -29,6 +29,13 @@ struct xarray { SPLAY_HEAD(xarray_tree, xarray_entry) xa_tree; }; +#define DEFINE_XARRAY_ALLOC(name) \ + struct xarray name = { \ + .xa_flags = XA_FLAGS_ALLOC, \ + .xa_lock = MUTEX_INITIALIZER(IPL_NONE), \ + .xa_tree = SPLAY_INITIALIZER(&name.xa_tree) \ + } + struct xarray_range { uint32_t start; uint32_t end; -- 2.20.1