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:
2daab50
)
KVM: PPC: e500: fix couple of shift operations on 64 bits
author
Tudor Laurentiu
<
[email protected]
>
Thu, 1 Oct 2015 12:58:03 +0000
(15:58 +0300)
committer
Paul Mackerras
<
[email protected]
>
Thu, 15 Oct 2015 04:59:19 +0000
(15:59 +1100)
Fix couple of cases where we shift left a 32-bit
value thus might get truncated results on 64-bit
targets.
Signed-off-by: Laurentiu Tudor <
[email protected]
>
Suggested-by: Scott Wood <
[email protected]
>
Acked-by: Scott Wood <
[email protected]
>
Signed-off-by: Paul Mackerras <
[email protected]
>
arch/powerpc/kvm/e500_mmu_host.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kvm/e500_mmu_host.c
b/arch/powerpc/kvm/e500_mmu_host.c
index 4d33e199edcc6769fa94d56a7a0a690a1dd4447c..5e2102c195860c5add54de62a9679e18220c89dd 100644
(file)
--- a/
arch/powerpc/kvm/e500_mmu_host.c
+++ b/
arch/powerpc/kvm/e500_mmu_host.c
@@
-406,7
+406,7
@@
static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
for (; tsize > BOOK3E_PAGESZ_4K; tsize -= 2) {
unsigned long gfn_start, gfn_end;
- tsize_pages = 1 << (tsize - 2);
+ tsize_pages = 1
UL
<< (tsize - 2);
gfn_start = gfn & ~(tsize_pages - 1);
gfn_end = gfn_start + tsize_pages;
@@
-447,7
+447,7
@@
static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
}
if (likely(!pfnmap)) {
- tsize_pages = 1 << (tsize + 10 - PAGE_SHIFT);
+ tsize_pages = 1
UL
<< (tsize + 10 - PAGE_SHIFT);
pfn = gfn_to_pfn_memslot(slot, gfn);
if (is_error_noslot_pfn(pfn)) {
if (printk_ratelimit())