projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
946260e
)
drm/i915/gvt: fix bad 32 bit shift in gtt
author
Jérémy Lefaure
<
[email protected]
>
Thu, 20 Oct 2016 22:05:57 +0000
(18:05 -0400)
committer
Zhenyu Wang
<
[email protected]
>
Tue, 25 Oct 2016 02:35:54 +0000
(10:35 +0800)
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 <
[email protected]
>
Signed-off-by: Zhenyu Wang <
[email protected]
>
drivers/gpu/drm/i915/gvt/gtt.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/gvt/gtt.c
b/drivers/gpu/drm/i915/gvt/gtt.c
index 2cc761328569c972cc7cb48962dfe7b53acec5f4..b35bda0ce46b5de2014b30b43ad4caace9cfa32e 100644
(file)
--- a/
drivers/gpu/drm/i915/gvt/gtt.c
+++ b/
drivers/gpu/drm/i915/gvt/gtt.c
@@
-276,7
+276,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;
}