artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b2f0e2
)
add DEFINE_XARRAY_ALLOC for 6.6.53 drm
author
jsg
<jsg@openbsd.org>
Tue, 1 Oct 2024 06:19:39 +0000
(06:19 +0000)
committer
jsg
<jsg@openbsd.org>
Tue, 1 Oct 2024 06:19:39 +0000
(06:19 +0000)
sys/dev/pci/drm/include/linux/xarray.h
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/include/linux/xarray.h
b/sys/dev/pci/drm/include/linux/xarray.h
index
fd64305
..
a48a295
100644
(file)
--- 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;