From c3125bc5bf12af535c984d0eabd99be5f7114503 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Fri, 24 Nov 2017 12:08:50 +0000 Subject: [PATCH] Compile fixes for 32-bit architectures. Sponsored by: Mellanox Technologies --- sys/contrib/rdma/krping/krping.c | 2 +- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/contrib/rdma/krping/krping.c b/sys/contrib/rdma/krping/krping.c index e87cf155955a..6e0608e685bc 100644 --- a/sys/contrib/rdma/krping/krping.c +++ b/sys/contrib/rdma/krping/krping.c @@ -1783,7 +1783,7 @@ static void krping_fr_test(struct krping_cb *cb) return; } - sg_dma_address(&sg) = 0xcafebabe0000UL; + sg_dma_address(&sg) = (dma_addr_t)0xcafebabe0000ULL; sg_dma_len(&sg) = size; ret = ib_map_mr_sg(mr, &sg, 1, NULL, PAGE_SIZE); if (ret <= 0) { diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index 0192279aac37..49d44e0a7487 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -1355,14 +1355,14 @@ static int uar_mmap(struct mlx5_ib_dev *dev, enum mlx5_ib_mmap_cmd cmd, err = io_remap_pfn_range(vma, vma->vm_start, pfn, PAGE_SIZE, vma->vm_page_prot); if (err) { - mlx5_ib_err(dev, "io_remap_pfn_range failed with error=%d, vm_start=0x%lx, pfn=%pa, mmap_cmd=%s\n", - err, vma->vm_start, &pfn, mmap_cmd2str(cmd)); + mlx5_ib_err(dev, "io_remap_pfn_range failed with error=%d, vm_start=0x%llx, pfn=%pa, mmap_cmd=%s\n", + err, (unsigned long long)vma->vm_start, &pfn, mmap_cmd2str(cmd)); return -EAGAIN; } pa = pfn << PAGE_SHIFT; - mlx5_ib_dbg(dev, "mapped %s at 0x%lx, PA %pa\n", mmap_cmd2str(cmd), - vma->vm_start, &pa); + mlx5_ib_dbg(dev, "mapped %s at 0x%llx, PA %pa\n", mmap_cmd2str(cmd), + (unsigned long long)vma->vm_start, &pa); return mlx5_ib_set_vma_data(vma, context); } @@ -1403,8 +1403,8 @@ static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm PAGE_SIZE, vma->vm_page_prot)) return -EAGAIN; - mlx5_ib_dbg(dev, "mapped internal timer at 0x%lx, PA 0x%llx\n", - vma->vm_start, + mlx5_ib_dbg(dev, "mapped internal timer at 0x%llx, PA 0x%llx\n", + (unsigned long long)vma->vm_start, (unsigned long long)pfn << PAGE_SHIFT); break;