[PATCH] nouveau: Fix missing types on shift
Alan
gnomes at lxorguk.ukuu.org.uk
Wed Feb 17 14:20:58 UTC 2016
Shifting 1 into a u64 doesn't do what you might expect. Force the width
before shifting.
Signed-off-by: Alan Cox <alan at linux.intel.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
More information about the dri-devel
mailing list