From: jsg Date: Tue, 1 Oct 2024 06:19:39 +0000 (+0000) Subject: add DEFINE_XARRAY_ALLOC for 6.6.53 drm X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b73929ac1ec6049ed241c039b31436332c6b3556;p=openbsd add DEFINE_XARRAY_ALLOC for 6.6.53 drm --- 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;