[PATCH 1/2] drm/i915/gvt: fix bad 32 bit shift in gtt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since ioread32 returns a 32-bit value, it is impossible to left-shift
this value by 32 bits (it produces a compilation error). Casting the
return value of ioread32 fix this issue.

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@xxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/gvt/gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index 29de179..d560898 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -274,7 +274,7 @@ static u64 read_pte64(struct drm_i915_private *dev_priv, unsigned long index)
 	pte = readq(addr);
 #else
 	pte = ioread32(addr);
-	pte |= ioread32(addr + 4) << 32;
+	pte |= (u64)ioread32(addr + 4) << 32;
 #endif
 	return pte;
 }
-- 
2.10.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux