Commit 31f09cb7 authored by Jérémy Lefaure's avatar Jérémy Lefaure Committed by Zhenyu Wang

drm/i915/gvt: fix bad 32 bit shift in gtt

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: default avatarJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent 946260e5
...@@ -276,7 +276,7 @@ static u64 read_pte64(struct drm_i915_private *dev_priv, unsigned long index) ...@@ -276,7 +276,7 @@ static u64 read_pte64(struct drm_i915_private *dev_priv, unsigned long index)
pte = readq(addr); pte = readq(addr);
#else #else
pte = ioread32(addr); pte = ioread32(addr);
pte |= ioread32(addr + 4) << 32; pte |= (u64)ioread32(addr + 4) << 32;
#endif #endif
return pte; return pte;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment