diff mbox

nouveau: Fix missing types on shift

Message ID 20160217142056.4997.56683.stgit@localhost.localdomain (mailing list archive)
State New, archived
Headers show

Commit Message

Alan Cox Feb. 17, 2016, 2:20 p.m. UTC
Shifting 1 into a u64 doesn't do what you might expect. Force the width
before shifting.

Signed-off-by: Alan Cox <alan@linux.intel.com>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c
index 7ac507c..6867746 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c
@@ -103,7 +103,7 @@  static void
 gf100_vm_map(struct nvkm_vma *vma, struct nvkm_memory *pgt,
 	     struct nvkm_mem *mem, u32 pte, u32 cnt, u64 phys, u64 delta)
 {
-	u64 next = 1 << (vma->node->type - 8);
+	u64 next = 1ULL << (vma->node->type - 8);
 
 	phys  = gf100_vm_addr(vma, phys, mem->memtype, 0);
 	pte <<= 3;