artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3d51c1
)
drm: buddy_allocator: Fix buddy allocator init on 32-bit systems
author
jsg
<jsg@openbsd.org>
Thu, 27 Apr 2023 02:32:24 +0000
(
02:32
+0000)
committer
jsg
<jsg@openbsd.org>
Thu, 27 Apr 2023 02:32:24 +0000
(
02:32
+0000)
From David Gow
fb766acce3cf1c9637a79c1ffb3cebc61fd9d859
in linux-6.1.y/6.1.26
4453545b5b4c3eff941f69a5530f916d899db025
in mainline linux
sys/dev/pci/drm/drm_buddy.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/drm_buddy.c
b/sys/dev/pci/drm/drm_buddy.c
index
083aec8
..
f18e7a7
100644
(file)
--- a/
sys/dev/pci/drm/drm_buddy.c
+++ b/
sys/dev/pci/drm/drm_buddy.c
@@
-156,8
+156,8
@@
int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size)
unsigned int order;
u64 root_size;
-
root_size = rounddown_pow_of_two(
size);
-
order = ilog2(root_size) - ilog2(chunk_size)
;
+
order = ilog2(size) - ilog2(chunk_
size);
+
root_size = chunk_size << order
;
root = drm_block_alloc(mm, NULL, order, offset);
if (!root)