projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46bda4f
)
drm/nouveau/mmu: swap out round for ALIGN
author
Ben Skeggs
<bskeggs@redhat.com>
Thu, 2 Nov 2017 22:36:25 +0000
(08:36 +1000)
committer
Ben Skeggs
<bskeggs@redhat.com>
Thu, 2 Nov 2017 23:12:09 +0000
(09:12 +1000)
Rounding value is guaranteed to be power-of-two, so this is better
anyway.
Fixes build on 32-bit.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
index 6446bc61b084a795b7891c13a234551a8b99a51a..e35d3e17cd7ca39555bff44948678961533b06af 100644
(file)
--- a/
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
+++ b/
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
@@
-1349,12
+1349,12
@@
nvkm_vmm_get_locked(struct nvkm_vmm *vmm, bool getref, bool mapref, bool sparse,
addr = this->addr;
if (vmm->func->page_block && prev && prev->page != p)
- addr =
roundup
(addr, vmm->func->page_block);
+ addr =
ALIGN
(addr, vmm->func->page_block);
addr = ALIGN(addr, 1ULL << align);
tail = this->addr + this->size;
if (vmm->func->page_block && next && next->page != p)
- tail =
rounddown(tail
, vmm->func->page_block);
+ tail =
ALIGN_DOWN(addr
, vmm->func->page_block);
if (addr <= tail && tail - addr >= size) {
rb_erase(&this->tree, &vmm->free);