diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-11-03 08:36:25 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-03 09:12:09 +1000 |
commit | 6497c2baf2c66938bfff51af9806d495bbb506f9 (patch) | |
tree | e856108738a2591bea9c0297095bcd11e1a7ed99 /drivers/gpu | |
parent | 46bda4f4af5d061ce07148e833ff4deb50737536 (diff) |
drm/nouveau/mmu: swap out round for ALIGN
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c index 6446bc61b084..e35d3e17cd7c 100644 --- 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); |