public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] drm/nouveau/mmu: shift wrapping bug in gf100_vm_map()
@ 2015-02-09 13:58 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-02-09 13:58 UTC (permalink / raw)
  To: David Airlie; +Cc: kernel-janitors, Ben Skeggs, dri-devel

Since "1" is an int, then it means we can't use the high bits of this
u64.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c
index 294cda3..b10c90a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c
@@ -106,7 +106,7 @@ static void
 gf100_vm_map(struct nvkm_vma *vma, struct nvkm_gpuobj *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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-09 13:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 13:58 [patch] drm/nouveau/mmu: shift wrapping bug in gf100_vm_map() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox