diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2021-01-28 08:50:25 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-02-08 18:20:08 +0200 |
commit | 6c1e3f92f9f1dfc7f14b43fd432c8ec95b1a188f (patch) | |
tree | 84510d1c481db6ab67e2a7d1f2b5746b95f56eb2 /drivers/misc | |
parent | 369aea84595189200a2e6b028f556a7efa0ec489 (diff) |
habanalabs: fix integer handling issue
Need to add ull suffix to constant when doing shift of constant
into 64-bit variables
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/common/mmu/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/mmu/mmu.c b/drivers/misc/habanalabs/common/mmu/mmu.c index 27dc0d116db5..71703a32350f 100644 --- 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 = (1ull << hop_shift) - 1; addr_mask = ~(offset_mask); *phys_addr = (tmp_phys_addr & addr_mask) | (virt_addr & offset_mask); |