projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
369aea8
)
habanalabs: fix integer handling issue
author
Oded Gabbay
<ogabbay@kernel.org>
Thu, 28 Jan 2021 06:50:25 +0000
(08:50 +0200)
committer
Oded Gabbay
<ogabbay@kernel.org>
Mon, 8 Feb 2021 16:20:08 +0000
(18:20 +0200)
Need to add ull suffix to constant when doing shift of constant
into 64-bit variables
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/mmu/mmu.c
patch
|
blob
|
history
diff --git
a/drivers/misc/habanalabs/common/mmu/mmu.c
b/drivers/misc/habanalabs/common/mmu/mmu.c
index 27dc0d116db57f8ab1134e08600a51cb43459b5c..71703a32350f66c7cd314ecaccd455442deeee01 100644
(file)
--- a/
drivers/misc/habanalabs/common/mmu/mmu.c
+++ b/
drivers/misc/habanalabs/common/mmu/mmu.c
@@
-507,7
+507,7
@@
static void hl_mmu_pa_page_with_offset(struct hl_ctx *ctx, u64 virt_addr,
p = (char *)p + hop0_shift_off;
p = (char *)p + ((hops->used_hops - 1) * sizeof(u64));
hop_shift = *(u64 *)p;
- offset_mask = (1 << hop_shift) - 1;
+ offset_mask = (1
ull
<< hop_shift) - 1;
addr_mask = ~(offset_mask);
*phys_addr = (tmp_phys_addr & addr_mask) |
(virt_addr & offset_mask);