diff options
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_mrmw.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_mrmw.c | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index f974367cad40..72f83f7df614 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c | |||
@@ -204,7 +204,7 @@ struct ib_mr *ehca_reg_phys_mr(struct ib_pd *pd, | |||
204 | } | 204 | } |
205 | if ((size == 0) || | 205 | if ((size == 0) || |
206 | (((u64)iova_start + size) < (u64)iova_start)) { | 206 | (((u64)iova_start + size) < (u64)iova_start)) { |
207 | ehca_err(pd->device, "bad input values: size=%lx iova_start=%p", | 207 | ehca_err(pd->device, "bad input values: size=%llx iova_start=%p", |
208 | size, iova_start); | 208 | size, iova_start); |
209 | ib_mr = ERR_PTR(-EINVAL); | 209 | ib_mr = ERR_PTR(-EINVAL); |
210 | goto reg_phys_mr_exit0; | 210 | goto reg_phys_mr_exit0; |
@@ -309,8 +309,8 @@ struct ib_mr *ehca_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, | |||
309 | } | 309 | } |
310 | 310 | ||
311 | if (length == 0 || virt + length < virt) { | 311 | if (length == 0 || virt + length < virt) { |
312 | ehca_err(pd->device, "bad input values: length=%lx " | 312 | ehca_err(pd->device, "bad input values: length=%llx " |
313 | "virt_base=%lx", length, virt); | 313 | "virt_base=%llx", length, virt); |
314 | ib_mr = ERR_PTR(-EINVAL); | 314 | ib_mr = ERR_PTR(-EINVAL); |
315 | goto reg_user_mr_exit0; | 315 | goto reg_user_mr_exit0; |
316 | } | 316 | } |
@@ -373,7 +373,7 @@ reg_user_mr_fallback: | |||
373 | &e_mr->ib.ib_mr.rkey); | 373 | &e_mr->ib.ib_mr.rkey); |
374 | if (ret == -EINVAL && pginfo.hwpage_size > PAGE_SIZE) { | 374 | if (ret == -EINVAL && pginfo.hwpage_size > PAGE_SIZE) { |
375 | ehca_warn(pd->device, "failed to register mr " | 375 | ehca_warn(pd->device, "failed to register mr " |
376 | "with hwpage_size=%lx", hwpage_size); | 376 | "with hwpage_size=%llx", hwpage_size); |
377 | ehca_info(pd->device, "try to register mr with " | 377 | ehca_info(pd->device, "try to register mr with " |
378 | "kpage_size=%lx", PAGE_SIZE); | 378 | "kpage_size=%lx", PAGE_SIZE); |
379 | /* | 379 | /* |
@@ -509,7 +509,7 @@ int ehca_rereg_phys_mr(struct ib_mr *mr, | |||
509 | goto rereg_phys_mr_exit1; | 509 | goto rereg_phys_mr_exit1; |
510 | if ((new_size == 0) || | 510 | if ((new_size == 0) || |
511 | (((u64)iova_start + new_size) < (u64)iova_start)) { | 511 | (((u64)iova_start + new_size) < (u64)iova_start)) { |
512 | ehca_err(mr->device, "bad input values: new_size=%lx " | 512 | ehca_err(mr->device, "bad input values: new_size=%llx " |
513 | "iova_start=%p", new_size, iova_start); | 513 | "iova_start=%p", new_size, iova_start); |
514 | ret = -EINVAL; | 514 | ret = -EINVAL; |
515 | goto rereg_phys_mr_exit1; | 515 | goto rereg_phys_mr_exit1; |
@@ -580,8 +580,8 @@ int ehca_query_mr(struct ib_mr *mr, struct ib_mr_attr *mr_attr) | |||
580 | 580 | ||
581 | h_ret = hipz_h_query_mr(shca->ipz_hca_handle, e_mr, &hipzout); | 581 | h_ret = hipz_h_query_mr(shca->ipz_hca_handle, e_mr, &hipzout); |
582 | if (h_ret != H_SUCCESS) { | 582 | if (h_ret != H_SUCCESS) { |
583 | ehca_err(mr->device, "hipz_mr_query failed, h_ret=%li mr=%p " | 583 | ehca_err(mr->device, "hipz_mr_query failed, h_ret=%lli mr=%p " |
584 | "hca_hndl=%lx mr_hndl=%lx lkey=%x", | 584 | "hca_hndl=%llx mr_hndl=%llx lkey=%x", |
585 | h_ret, mr, shca->ipz_hca_handle.handle, | 585 | h_ret, mr, shca->ipz_hca_handle.handle, |
586 | e_mr->ipz_mr_handle.handle, mr->lkey); | 586 | e_mr->ipz_mr_handle.handle, mr->lkey); |
587 | ret = ehca2ib_return_code(h_ret); | 587 | ret = ehca2ib_return_code(h_ret); |
@@ -630,8 +630,8 @@ int ehca_dereg_mr(struct ib_mr *mr) | |||
630 | /* TODO: BUSY: MR still has bound window(s) */ | 630 | /* TODO: BUSY: MR still has bound window(s) */ |
631 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); | 631 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); |
632 | if (h_ret != H_SUCCESS) { | 632 | if (h_ret != H_SUCCESS) { |
633 | ehca_err(mr->device, "hipz_free_mr failed, h_ret=%li shca=%p " | 633 | ehca_err(mr->device, "hipz_free_mr failed, h_ret=%lli shca=%p " |
634 | "e_mr=%p hca_hndl=%lx mr_hndl=%lx mr->lkey=%x", | 634 | "e_mr=%p hca_hndl=%llx mr_hndl=%llx mr->lkey=%x", |
635 | h_ret, shca, e_mr, shca->ipz_hca_handle.handle, | 635 | h_ret, shca, e_mr, shca->ipz_hca_handle.handle, |
636 | e_mr->ipz_mr_handle.handle, mr->lkey); | 636 | e_mr->ipz_mr_handle.handle, mr->lkey); |
637 | ret = ehca2ib_return_code(h_ret); | 637 | ret = ehca2ib_return_code(h_ret); |
@@ -671,8 +671,8 @@ struct ib_mw *ehca_alloc_mw(struct ib_pd *pd) | |||
671 | h_ret = hipz_h_alloc_resource_mw(shca->ipz_hca_handle, e_mw, | 671 | h_ret = hipz_h_alloc_resource_mw(shca->ipz_hca_handle, e_mw, |
672 | e_pd->fw_pd, &hipzout); | 672 | e_pd->fw_pd, &hipzout); |
673 | if (h_ret != H_SUCCESS) { | 673 | if (h_ret != H_SUCCESS) { |
674 | ehca_err(pd->device, "hipz_mw_allocate failed, h_ret=%li " | 674 | ehca_err(pd->device, "hipz_mw_allocate failed, h_ret=%lli " |
675 | "shca=%p hca_hndl=%lx mw=%p", | 675 | "shca=%p hca_hndl=%llx mw=%p", |
676 | h_ret, shca, shca->ipz_hca_handle.handle, e_mw); | 676 | h_ret, shca, shca->ipz_hca_handle.handle, e_mw); |
677 | ib_mw = ERR_PTR(ehca2ib_return_code(h_ret)); | 677 | ib_mw = ERR_PTR(ehca2ib_return_code(h_ret)); |
678 | goto alloc_mw_exit1; | 678 | goto alloc_mw_exit1; |
@@ -713,8 +713,8 @@ int ehca_dealloc_mw(struct ib_mw *mw) | |||
713 | 713 | ||
714 | h_ret = hipz_h_free_resource_mw(shca->ipz_hca_handle, e_mw); | 714 | h_ret = hipz_h_free_resource_mw(shca->ipz_hca_handle, e_mw); |
715 | if (h_ret != H_SUCCESS) { | 715 | if (h_ret != H_SUCCESS) { |
716 | ehca_err(mw->device, "hipz_free_mw failed, h_ret=%li shca=%p " | 716 | ehca_err(mw->device, "hipz_free_mw failed, h_ret=%lli shca=%p " |
717 | "mw=%p rkey=%x hca_hndl=%lx mw_hndl=%lx", | 717 | "mw=%p rkey=%x hca_hndl=%llx mw_hndl=%llx", |
718 | h_ret, shca, mw, mw->rkey, shca->ipz_hca_handle.handle, | 718 | h_ret, shca, mw, mw->rkey, shca->ipz_hca_handle.handle, |
719 | e_mw->ipz_mw_handle.handle); | 719 | e_mw->ipz_mw_handle.handle); |
720 | return ehca2ib_return_code(h_ret); | 720 | return ehca2ib_return_code(h_ret); |
@@ -840,7 +840,7 @@ int ehca_map_phys_fmr(struct ib_fmr *fmr, | |||
840 | goto map_phys_fmr_exit0; | 840 | goto map_phys_fmr_exit0; |
841 | if (iova % e_fmr->fmr_page_size) { | 841 | if (iova % e_fmr->fmr_page_size) { |
842 | /* only whole-numbered pages */ | 842 | /* only whole-numbered pages */ |
843 | ehca_err(fmr->device, "bad iova, iova=%lx fmr_page_size=%x", | 843 | ehca_err(fmr->device, "bad iova, iova=%llx fmr_page_size=%x", |
844 | iova, e_fmr->fmr_page_size); | 844 | iova, e_fmr->fmr_page_size); |
845 | ret = -EINVAL; | 845 | ret = -EINVAL; |
846 | goto map_phys_fmr_exit0; | 846 | goto map_phys_fmr_exit0; |
@@ -878,7 +878,7 @@ int ehca_map_phys_fmr(struct ib_fmr *fmr, | |||
878 | map_phys_fmr_exit0: | 878 | map_phys_fmr_exit0: |
879 | if (ret) | 879 | if (ret) |
880 | ehca_err(fmr->device, "ret=%i fmr=%p page_list=%p list_len=%x " | 880 | ehca_err(fmr->device, "ret=%i fmr=%p page_list=%p list_len=%x " |
881 | "iova=%lx", ret, fmr, page_list, list_len, iova); | 881 | "iova=%llx", ret, fmr, page_list, list_len, iova); |
882 | return ret; | 882 | return ret; |
883 | } /* end ehca_map_phys_fmr() */ | 883 | } /* end ehca_map_phys_fmr() */ |
884 | 884 | ||
@@ -964,8 +964,8 @@ int ehca_dealloc_fmr(struct ib_fmr *fmr) | |||
964 | 964 | ||
965 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_fmr); | 965 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_fmr); |
966 | if (h_ret != H_SUCCESS) { | 966 | if (h_ret != H_SUCCESS) { |
967 | ehca_err(fmr->device, "hipz_free_mr failed, h_ret=%li e_fmr=%p " | 967 | ehca_err(fmr->device, "hipz_free_mr failed, h_ret=%lli e_fmr=%p " |
968 | "hca_hndl=%lx fmr_hndl=%lx fmr->lkey=%x", | 968 | "hca_hndl=%llx fmr_hndl=%llx fmr->lkey=%x", |
969 | h_ret, e_fmr, shca->ipz_hca_handle.handle, | 969 | h_ret, e_fmr, shca->ipz_hca_handle.handle, |
970 | e_fmr->ipz_mr_handle.handle, fmr->lkey); | 970 | e_fmr->ipz_mr_handle.handle, fmr->lkey); |
971 | ret = ehca2ib_return_code(h_ret); | 971 | ret = ehca2ib_return_code(h_ret); |
@@ -1007,8 +1007,8 @@ int ehca_reg_mr(struct ehca_shca *shca, | |||
1007 | (u64)iova_start, size, hipz_acl, | 1007 | (u64)iova_start, size, hipz_acl, |
1008 | e_pd->fw_pd, &hipzout); | 1008 | e_pd->fw_pd, &hipzout); |
1009 | if (h_ret != H_SUCCESS) { | 1009 | if (h_ret != H_SUCCESS) { |
1010 | ehca_err(&shca->ib_device, "hipz_alloc_mr failed, h_ret=%li " | 1010 | ehca_err(&shca->ib_device, "hipz_alloc_mr failed, h_ret=%lli " |
1011 | "hca_hndl=%lx", h_ret, shca->ipz_hca_handle.handle); | 1011 | "hca_hndl=%llx", h_ret, shca->ipz_hca_handle.handle); |
1012 | ret = ehca2ib_return_code(h_ret); | 1012 | ret = ehca2ib_return_code(h_ret); |
1013 | goto ehca_reg_mr_exit0; | 1013 | goto ehca_reg_mr_exit0; |
1014 | } | 1014 | } |
@@ -1033,9 +1033,9 @@ int ehca_reg_mr(struct ehca_shca *shca, | |||
1033 | ehca_reg_mr_exit1: | 1033 | ehca_reg_mr_exit1: |
1034 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); | 1034 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); |
1035 | if (h_ret != H_SUCCESS) { | 1035 | if (h_ret != H_SUCCESS) { |
1036 | ehca_err(&shca->ib_device, "h_ret=%li shca=%p e_mr=%p " | 1036 | ehca_err(&shca->ib_device, "h_ret=%lli shca=%p e_mr=%p " |
1037 | "iova_start=%p size=%lx acl=%x e_pd=%p lkey=%x " | 1037 | "iova_start=%p size=%llx acl=%x e_pd=%p lkey=%x " |
1038 | "pginfo=%p num_kpages=%lx num_hwpages=%lx ret=%i", | 1038 | "pginfo=%p num_kpages=%llx num_hwpages=%llx ret=%i", |
1039 | h_ret, shca, e_mr, iova_start, size, acl, e_pd, | 1039 | h_ret, shca, e_mr, iova_start, size, acl, e_pd, |
1040 | hipzout.lkey, pginfo, pginfo->num_kpages, | 1040 | hipzout.lkey, pginfo, pginfo->num_kpages, |
1041 | pginfo->num_hwpages, ret); | 1041 | pginfo->num_hwpages, ret); |
@@ -1045,8 +1045,8 @@ ehca_reg_mr_exit1: | |||
1045 | ehca_reg_mr_exit0: | 1045 | ehca_reg_mr_exit0: |
1046 | if (ret) | 1046 | if (ret) |
1047 | ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p " | 1047 | ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p " |
1048 | "iova_start=%p size=%lx acl=%x e_pd=%p pginfo=%p " | 1048 | "iova_start=%p size=%llx acl=%x e_pd=%p pginfo=%p " |
1049 | "num_kpages=%lx num_hwpages=%lx", | 1049 | "num_kpages=%llx num_hwpages=%llx", |
1050 | ret, shca, e_mr, iova_start, size, acl, e_pd, pginfo, | 1050 | ret, shca, e_mr, iova_start, size, acl, e_pd, pginfo, |
1051 | pginfo->num_kpages, pginfo->num_hwpages); | 1051 | pginfo->num_kpages, pginfo->num_hwpages); |
1052 | return ret; | 1052 | return ret; |
@@ -1116,8 +1116,8 @@ int ehca_reg_mr_rpages(struct ehca_shca *shca, | |||
1116 | */ | 1116 | */ |
1117 | if (h_ret != H_SUCCESS) { | 1117 | if (h_ret != H_SUCCESS) { |
1118 | ehca_err(&shca->ib_device, "last " | 1118 | ehca_err(&shca->ib_device, "last " |
1119 | "hipz_reg_rpage_mr failed, h_ret=%li " | 1119 | "hipz_reg_rpage_mr failed, h_ret=%lli " |
1120 | "e_mr=%p i=%x hca_hndl=%lx mr_hndl=%lx" | 1120 | "e_mr=%p i=%x hca_hndl=%llx mr_hndl=%llx" |
1121 | " lkey=%x", h_ret, e_mr, i, | 1121 | " lkey=%x", h_ret, e_mr, i, |
1122 | shca->ipz_hca_handle.handle, | 1122 | shca->ipz_hca_handle.handle, |
1123 | e_mr->ipz_mr_handle.handle, | 1123 | e_mr->ipz_mr_handle.handle, |
@@ -1128,8 +1128,8 @@ int ehca_reg_mr_rpages(struct ehca_shca *shca, | |||
1128 | ret = 0; | 1128 | ret = 0; |
1129 | } else if (h_ret != H_PAGE_REGISTERED) { | 1129 | } else if (h_ret != H_PAGE_REGISTERED) { |
1130 | ehca_err(&shca->ib_device, "hipz_reg_rpage_mr failed, " | 1130 | ehca_err(&shca->ib_device, "hipz_reg_rpage_mr failed, " |
1131 | "h_ret=%li e_mr=%p i=%x lkey=%x hca_hndl=%lx " | 1131 | "h_ret=%lli e_mr=%p i=%x lkey=%x hca_hndl=%llx " |
1132 | "mr_hndl=%lx", h_ret, e_mr, i, | 1132 | "mr_hndl=%llx", h_ret, e_mr, i, |
1133 | e_mr->ib.ib_mr.lkey, | 1133 | e_mr->ib.ib_mr.lkey, |
1134 | shca->ipz_hca_handle.handle, | 1134 | shca->ipz_hca_handle.handle, |
1135 | e_mr->ipz_mr_handle.handle); | 1135 | e_mr->ipz_mr_handle.handle); |
@@ -1145,7 +1145,7 @@ ehca_reg_mr_rpages_exit1: | |||
1145 | ehca_reg_mr_rpages_exit0: | 1145 | ehca_reg_mr_rpages_exit0: |
1146 | if (ret) | 1146 | if (ret) |
1147 | ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p pginfo=%p " | 1147 | ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p pginfo=%p " |
1148 | "num_kpages=%lx num_hwpages=%lx", ret, shca, e_mr, | 1148 | "num_kpages=%llx num_hwpages=%llx", ret, shca, e_mr, |
1149 | pginfo, pginfo->num_kpages, pginfo->num_hwpages); | 1149 | pginfo, pginfo->num_kpages, pginfo->num_hwpages); |
1150 | return ret; | 1150 | return ret; |
1151 | } /* end ehca_reg_mr_rpages() */ | 1151 | } /* end ehca_reg_mr_rpages() */ |
@@ -1184,7 +1184,7 @@ inline int ehca_rereg_mr_rereg1(struct ehca_shca *shca, | |||
1184 | ret = ehca_set_pagebuf(pginfo, pginfo->num_hwpages, kpage); | 1184 | ret = ehca_set_pagebuf(pginfo, pginfo->num_hwpages, kpage); |
1185 | if (ret) { | 1185 | if (ret) { |
1186 | ehca_err(&shca->ib_device, "set pagebuf failed, e_mr=%p " | 1186 | ehca_err(&shca->ib_device, "set pagebuf failed, e_mr=%p " |
1187 | "pginfo=%p type=%x num_kpages=%lx num_hwpages=%lx " | 1187 | "pginfo=%p type=%x num_kpages=%llx num_hwpages=%llx " |
1188 | "kpage=%p", e_mr, pginfo, pginfo->type, | 1188 | "kpage=%p", e_mr, pginfo, pginfo->type, |
1189 | pginfo->num_kpages, pginfo->num_hwpages, kpage); | 1189 | pginfo->num_kpages, pginfo->num_hwpages, kpage); |
1190 | goto ehca_rereg_mr_rereg1_exit1; | 1190 | goto ehca_rereg_mr_rereg1_exit1; |
@@ -1205,13 +1205,13 @@ inline int ehca_rereg_mr_rereg1(struct ehca_shca *shca, | |||
1205 | * (MW bound or MR is shared) | 1205 | * (MW bound or MR is shared) |
1206 | */ | 1206 | */ |
1207 | ehca_warn(&shca->ib_device, "hipz_h_reregister_pmr failed " | 1207 | ehca_warn(&shca->ib_device, "hipz_h_reregister_pmr failed " |
1208 | "(Rereg1), h_ret=%li e_mr=%p", h_ret, e_mr); | 1208 | "(Rereg1), h_ret=%lli e_mr=%p", h_ret, e_mr); |
1209 | *pginfo = pginfo_save; | 1209 | *pginfo = pginfo_save; |
1210 | ret = -EAGAIN; | 1210 | ret = -EAGAIN; |
1211 | } else if ((u64 *)hipzout.vaddr != iova_start) { | 1211 | } else if ((u64 *)hipzout.vaddr != iova_start) { |
1212 | ehca_err(&shca->ib_device, "PHYP changed iova_start in " | 1212 | ehca_err(&shca->ib_device, "PHYP changed iova_start in " |
1213 | "rereg_pmr, iova_start=%p iova_start_out=%lx e_mr=%p " | 1213 | "rereg_pmr, iova_start=%p iova_start_out=%llx e_mr=%p " |
1214 | "mr_handle=%lx lkey=%x lkey_out=%x", iova_start, | 1214 | "mr_handle=%llx lkey=%x lkey_out=%x", iova_start, |
1215 | hipzout.vaddr, e_mr, e_mr->ipz_mr_handle.handle, | 1215 | hipzout.vaddr, e_mr, e_mr->ipz_mr_handle.handle, |
1216 | e_mr->ib.ib_mr.lkey, hipzout.lkey); | 1216 | e_mr->ib.ib_mr.lkey, hipzout.lkey); |
1217 | ret = -EFAULT; | 1217 | ret = -EFAULT; |
@@ -1235,7 +1235,7 @@ ehca_rereg_mr_rereg1_exit1: | |||
1235 | ehca_rereg_mr_rereg1_exit0: | 1235 | ehca_rereg_mr_rereg1_exit0: |
1236 | if ( ret && (ret != -EAGAIN) ) | 1236 | if ( ret && (ret != -EAGAIN) ) |
1237 | ehca_err(&shca->ib_device, "ret=%i lkey=%x rkey=%x " | 1237 | ehca_err(&shca->ib_device, "ret=%i lkey=%x rkey=%x " |
1238 | "pginfo=%p num_kpages=%lx num_hwpages=%lx", | 1238 | "pginfo=%p num_kpages=%llx num_hwpages=%llx", |
1239 | ret, *lkey, *rkey, pginfo, pginfo->num_kpages, | 1239 | ret, *lkey, *rkey, pginfo, pginfo->num_kpages, |
1240 | pginfo->num_hwpages); | 1240 | pginfo->num_hwpages); |
1241 | return ret; | 1241 | return ret; |
@@ -1263,7 +1263,7 @@ int ehca_rereg_mr(struct ehca_shca *shca, | |||
1263 | (e_mr->num_hwpages > MAX_RPAGES) || | 1263 | (e_mr->num_hwpages > MAX_RPAGES) || |
1264 | (pginfo->num_hwpages > e_mr->num_hwpages)) { | 1264 | (pginfo->num_hwpages > e_mr->num_hwpages)) { |
1265 | ehca_dbg(&shca->ib_device, "Rereg3 case, " | 1265 | ehca_dbg(&shca->ib_device, "Rereg3 case, " |
1266 | "pginfo->num_hwpages=%lx e_mr->num_hwpages=%x", | 1266 | "pginfo->num_hwpages=%llx e_mr->num_hwpages=%x", |
1267 | pginfo->num_hwpages, e_mr->num_hwpages); | 1267 | pginfo->num_hwpages, e_mr->num_hwpages); |
1268 | rereg_1_hcall = 0; | 1268 | rereg_1_hcall = 0; |
1269 | rereg_3_hcall = 1; | 1269 | rereg_3_hcall = 1; |
@@ -1295,7 +1295,7 @@ int ehca_rereg_mr(struct ehca_shca *shca, | |||
1295 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); | 1295 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr); |
1296 | if (h_ret != H_SUCCESS) { | 1296 | if (h_ret != H_SUCCESS) { |
1297 | ehca_err(&shca->ib_device, "hipz_free_mr failed, " | 1297 | ehca_err(&shca->ib_device, "hipz_free_mr failed, " |
1298 | "h_ret=%li e_mr=%p hca_hndl=%lx mr_hndl=%lx " | 1298 | "h_ret=%lli e_mr=%p hca_hndl=%llx mr_hndl=%llx " |
1299 | "mr->lkey=%x", | 1299 | "mr->lkey=%x", |
1300 | h_ret, e_mr, shca->ipz_hca_handle.handle, | 1300 | h_ret, e_mr, shca->ipz_hca_handle.handle, |
1301 | e_mr->ipz_mr_handle.handle, | 1301 | e_mr->ipz_mr_handle.handle, |
@@ -1328,8 +1328,8 @@ int ehca_rereg_mr(struct ehca_shca *shca, | |||
1328 | ehca_rereg_mr_exit0: | 1328 | ehca_rereg_mr_exit0: |
1329 | if (ret) | 1329 | if (ret) |
1330 | ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p " | 1330 | ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p " |
1331 | "iova_start=%p size=%lx acl=%x e_pd=%p pginfo=%p " | 1331 | "iova_start=%p size=%llx acl=%x e_pd=%p pginfo=%p " |
1332 | "num_kpages=%lx lkey=%x rkey=%x rereg_1_hcall=%x " | 1332 | "num_kpages=%llx lkey=%x rkey=%x rereg_1_hcall=%x " |
1333 | "rereg_3_hcall=%x", ret, shca, e_mr, iova_start, size, | 1333 | "rereg_3_hcall=%x", ret, shca, e_mr, iova_start, size, |
1334 | acl, e_pd, pginfo, pginfo->num_kpages, *lkey, *rkey, | 1334 | acl, e_pd, pginfo, pginfo->num_kpages, *lkey, *rkey, |
1335 | rereg_1_hcall, rereg_3_hcall); | 1335 | rereg_1_hcall, rereg_3_hcall); |
@@ -1371,8 +1371,8 @@ int ehca_unmap_one_fmr(struct ehca_shca *shca, | |||
1371 | * FMRs are not shared and no MW bound to FMRs | 1371 | * FMRs are not shared and no MW bound to FMRs |
1372 | */ | 1372 | */ |
1373 | ehca_err(&shca->ib_device, "hipz_reregister_pmr failed " | 1373 | ehca_err(&shca->ib_device, "hipz_reregister_pmr failed " |
1374 | "(Rereg1), h_ret=%li e_fmr=%p hca_hndl=%lx " | 1374 | "(Rereg1), h_ret=%lli e_fmr=%p hca_hndl=%llx " |
1375 | "mr_hndl=%lx lkey=%x lkey_out=%x", | 1375 | "mr_hndl=%llx lkey=%x lkey_out=%x", |
1376 | h_ret, e_fmr, shca->ipz_hca_handle.handle, | 1376 | h_ret, e_fmr, shca->ipz_hca_handle.handle, |
1377 | e_fmr->ipz_mr_handle.handle, | 1377 | e_fmr->ipz_mr_handle.handle, |
1378 | e_fmr->ib.ib_fmr.lkey, hipzout.lkey); | 1378 | e_fmr->ib.ib_fmr.lkey, hipzout.lkey); |
@@ -1383,7 +1383,7 @@ int ehca_unmap_one_fmr(struct ehca_shca *shca, | |||
1383 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_fmr); | 1383 | h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_fmr); |
1384 | if (h_ret != H_SUCCESS) { | 1384 | if (h_ret != H_SUCCESS) { |
1385 | ehca_err(&shca->ib_device, "hipz_free_mr failed, " | 1385 | ehca_err(&shca->ib_device, "hipz_free_mr failed, " |
1386 | "h_ret=%li e_fmr=%p hca_hndl=%lx mr_hndl=%lx " | 1386 | "h_ret=%lli e_fmr=%p hca_hndl=%llx mr_hndl=%llx " |
1387 | "lkey=%x", | 1387 | "lkey=%x", |
1388 | h_ret, e_fmr, shca->ipz_hca_handle.handle, | 1388 | h_ret, e_fmr, shca->ipz_hca_handle.handle, |
1389 | e_fmr->ipz_mr_handle.handle, | 1389 | e_fmr->ipz_mr_handle.handle, |
@@ -1447,9 +1447,9 @@ int ehca_reg_smr(struct ehca_shca *shca, | |||
1447 | (u64)iova_start, hipz_acl, e_pd->fw_pd, | 1447 | (u64)iova_start, hipz_acl, e_pd->fw_pd, |
1448 | &hipzout); | 1448 | &hipzout); |
1449 | if (h_ret != H_SUCCESS) { | 1449 | if (h_ret != H_SUCCESS) { |
1450 | ehca_err(&shca->ib_device, "hipz_reg_smr failed, h_ret=%li " | 1450 | ehca_err(&shca->ib_device, "hipz_reg_smr failed, h_ret=%lli " |
1451 | "shca=%p e_origmr=%p e_newmr=%p iova_start=%p acl=%x " | 1451 | "shca=%p e_origmr=%p e_newmr=%p iova_start=%p acl=%x " |
1452 | "e_pd=%p hca_hndl=%lx mr_hndl=%lx lkey=%x", | 1452 | "e_pd=%p hca_hndl=%llx mr_hndl=%llx lkey=%x", |
1453 | h_ret, shca, e_origmr, e_newmr, iova_start, acl, e_pd, | 1453 | h_ret, shca, e_origmr, e_newmr, iova_start, acl, e_pd, |
1454 | shca->ipz_hca_handle.handle, | 1454 | shca->ipz_hca_handle.handle, |
1455 | e_origmr->ipz_mr_handle.handle, | 1455 | e_origmr->ipz_mr_handle.handle, |
@@ -1527,7 +1527,7 @@ int ehca_reg_internal_maxmr( | |||
1527 | &e_mr->ib.ib_mr.rkey); | 1527 | &e_mr->ib.ib_mr.rkey); |
1528 | if (ret) { | 1528 | if (ret) { |
1529 | ehca_err(&shca->ib_device, "reg of internal max MR failed, " | 1529 | ehca_err(&shca->ib_device, "reg of internal max MR failed, " |
1530 | "e_mr=%p iova_start=%p size_maxmr=%lx num_kpages=%x " | 1530 | "e_mr=%p iova_start=%p size_maxmr=%llx num_kpages=%x " |
1531 | "num_hwpages=%x", e_mr, iova_start, size_maxmr, | 1531 | "num_hwpages=%x", e_mr, iova_start, size_maxmr, |
1532 | num_kpages, num_hwpages); | 1532 | num_kpages, num_hwpages); |
1533 | goto ehca_reg_internal_maxmr_exit1; | 1533 | goto ehca_reg_internal_maxmr_exit1; |
@@ -1573,8 +1573,8 @@ int ehca_reg_maxmr(struct ehca_shca *shca, | |||
1573 | (u64)iova_start, hipz_acl, e_pd->fw_pd, | 1573 | (u64)iova_start, hipz_acl, e_pd->fw_pd, |
1574 | &hipzout); | 1574 | &hipzout); |
1575 | if (h_ret != H_SUCCESS) { | 1575 | if (h_ret != H_SUCCESS) { |
1576 | ehca_err(&shca->ib_device, "hipz_reg_smr failed, h_ret=%li " | 1576 | ehca_err(&shca->ib_device, "hipz_reg_smr failed, h_ret=%lli " |
1577 | "e_origmr=%p hca_hndl=%lx mr_hndl=%lx lkey=%x", | 1577 | "e_origmr=%p hca_hndl=%llx mr_hndl=%llx lkey=%x", |
1578 | h_ret, e_origmr, shca->ipz_hca_handle.handle, | 1578 | h_ret, e_origmr, shca->ipz_hca_handle.handle, |
1579 | e_origmr->ipz_mr_handle.handle, | 1579 | e_origmr->ipz_mr_handle.handle, |
1580 | e_origmr->ib.ib_mr.lkey); | 1580 | e_origmr->ib.ib_mr.lkey); |
@@ -1651,28 +1651,28 @@ int ehca_mr_chk_buf_and_calc_size(struct ib_phys_buf *phys_buf_array, | |||
1651 | /* check first buffer */ | 1651 | /* check first buffer */ |
1652 | if (((u64)iova_start & ~PAGE_MASK) != (pbuf->addr & ~PAGE_MASK)) { | 1652 | if (((u64)iova_start & ~PAGE_MASK) != (pbuf->addr & ~PAGE_MASK)) { |
1653 | ehca_gen_err("iova_start/addr mismatch, iova_start=%p " | 1653 | ehca_gen_err("iova_start/addr mismatch, iova_start=%p " |
1654 | "pbuf->addr=%lx pbuf->size=%lx", | 1654 | "pbuf->addr=%llx pbuf->size=%llx", |
1655 | iova_start, pbuf->addr, pbuf->size); | 1655 | iova_start, pbuf->addr, pbuf->size); |
1656 | return -EINVAL; | 1656 | return -EINVAL; |
1657 | } | 1657 | } |
1658 | if (((pbuf->addr + pbuf->size) % PAGE_SIZE) && | 1658 | if (((pbuf->addr + pbuf->size) % PAGE_SIZE) && |
1659 | (num_phys_buf > 1)) { | 1659 | (num_phys_buf > 1)) { |
1660 | ehca_gen_err("addr/size mismatch in 1st buf, pbuf->addr=%lx " | 1660 | ehca_gen_err("addr/size mismatch in 1st buf, pbuf->addr=%llx " |
1661 | "pbuf->size=%lx", pbuf->addr, pbuf->size); | 1661 | "pbuf->size=%llx", pbuf->addr, pbuf->size); |
1662 | return -EINVAL; | 1662 | return -EINVAL; |
1663 | } | 1663 | } |
1664 | 1664 | ||
1665 | for (i = 0; i < num_phys_buf; i++) { | 1665 | for (i = 0; i < num_phys_buf; i++) { |
1666 | if ((i > 0) && (pbuf->addr % PAGE_SIZE)) { | 1666 | if ((i > 0) && (pbuf->addr % PAGE_SIZE)) { |
1667 | ehca_gen_err("bad address, i=%x pbuf->addr=%lx " | 1667 | ehca_gen_err("bad address, i=%x pbuf->addr=%llx " |
1668 | "pbuf->size=%lx", | 1668 | "pbuf->size=%llx", |
1669 | i, pbuf->addr, pbuf->size); | 1669 | i, pbuf->addr, pbuf->size); |
1670 | return -EINVAL; | 1670 | return -EINVAL; |
1671 | } | 1671 | } |
1672 | if (((i > 0) && /* not 1st */ | 1672 | if (((i > 0) && /* not 1st */ |
1673 | (i < (num_phys_buf - 1)) && /* not last */ | 1673 | (i < (num_phys_buf - 1)) && /* not last */ |
1674 | (pbuf->size % PAGE_SIZE)) || (pbuf->size == 0)) { | 1674 | (pbuf->size % PAGE_SIZE)) || (pbuf->size == 0)) { |
1675 | ehca_gen_err("bad size, i=%x pbuf->size=%lx", | 1675 | ehca_gen_err("bad size, i=%x pbuf->size=%llx", |
1676 | i, pbuf->size); | 1676 | i, pbuf->size); |
1677 | return -EINVAL; | 1677 | return -EINVAL; |
1678 | } | 1678 | } |
@@ -1705,7 +1705,7 @@ int ehca_fmr_check_page_list(struct ehca_mr *e_fmr, | |||
1705 | page = page_list; | 1705 | page = page_list; |
1706 | for (i = 0; i < list_len; i++) { | 1706 | for (i = 0; i < list_len; i++) { |
1707 | if (*page % e_fmr->fmr_page_size) { | 1707 | if (*page % e_fmr->fmr_page_size) { |
1708 | ehca_gen_err("bad page, i=%x *page=%lx page=%p fmr=%p " | 1708 | ehca_gen_err("bad page, i=%x *page=%llx page=%p fmr=%p " |
1709 | "fmr_page_size=%x", i, *page, page, e_fmr, | 1709 | "fmr_page_size=%x", i, *page, page, e_fmr, |
1710 | e_fmr->fmr_page_size); | 1710 | e_fmr->fmr_page_size); |
1711 | return -EINVAL; | 1711 | return -EINVAL; |
@@ -1743,9 +1743,9 @@ static int ehca_set_pagebuf_user1(struct ehca_mr_pginfo *pginfo, | |||
1743 | (pginfo->next_hwpage * | 1743 | (pginfo->next_hwpage * |
1744 | pginfo->hwpage_size)); | 1744 | pginfo->hwpage_size)); |
1745 | if ( !(*kpage) ) { | 1745 | if ( !(*kpage) ) { |
1746 | ehca_gen_err("pgaddr=%lx " | 1746 | ehca_gen_err("pgaddr=%llx " |
1747 | "chunk->page_list[i]=%lx " | 1747 | "chunk->page_list[i]=%llx " |
1748 | "i=%x next_hwpage=%lx", | 1748 | "i=%x next_hwpage=%llx", |
1749 | pgaddr, (u64)sg_dma_address( | 1749 | pgaddr, (u64)sg_dma_address( |
1750 | &chunk->page_list[i]), | 1750 | &chunk->page_list[i]), |
1751 | i, pginfo->next_hwpage); | 1751 | i, pginfo->next_hwpage); |
@@ -1795,11 +1795,11 @@ static int ehca_check_kpages_per_ate(struct scatterlist *page_list, | |||
1795 | for (t = start_idx; t <= end_idx; t++) { | 1795 | for (t = start_idx; t <= end_idx; t++) { |
1796 | u64 pgaddr = page_to_pfn(sg_page(&page_list[t])) << PAGE_SHIFT; | 1796 | u64 pgaddr = page_to_pfn(sg_page(&page_list[t])) << PAGE_SHIFT; |
1797 | if (ehca_debug_level >= 3) | 1797 | if (ehca_debug_level >= 3) |
1798 | ehca_gen_dbg("chunk_page=%lx value=%016lx", pgaddr, | 1798 | ehca_gen_dbg("chunk_page=%llx value=%016llx", pgaddr, |
1799 | *(u64 *)abs_to_virt(phys_to_abs(pgaddr))); | 1799 | *(u64 *)abs_to_virt(phys_to_abs(pgaddr))); |
1800 | if (pgaddr - PAGE_SIZE != *prev_pgaddr) { | 1800 | if (pgaddr - PAGE_SIZE != *prev_pgaddr) { |
1801 | ehca_gen_err("uncontiguous page found pgaddr=%lx " | 1801 | ehca_gen_err("uncontiguous page found pgaddr=%llx " |
1802 | "prev_pgaddr=%lx page_list_i=%x", | 1802 | "prev_pgaddr=%llx page_list_i=%x", |
1803 | pgaddr, *prev_pgaddr, t); | 1803 | pgaddr, *prev_pgaddr, t); |
1804 | return -EINVAL; | 1804 | return -EINVAL; |
1805 | } | 1805 | } |
@@ -1833,7 +1833,7 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo, | |||
1833 | << PAGE_SHIFT ); | 1833 | << PAGE_SHIFT ); |
1834 | *kpage = phys_to_abs(pgaddr); | 1834 | *kpage = phys_to_abs(pgaddr); |
1835 | if ( !(*kpage) ) { | 1835 | if ( !(*kpage) ) { |
1836 | ehca_gen_err("pgaddr=%lx i=%x", | 1836 | ehca_gen_err("pgaddr=%llx i=%x", |
1837 | pgaddr, i); | 1837 | pgaddr, i); |
1838 | ret = -EFAULT; | 1838 | ret = -EFAULT; |
1839 | return ret; | 1839 | return ret; |
@@ -1846,8 +1846,8 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo, | |||
1846 | if (pginfo->hwpage_cnt) { | 1846 | if (pginfo->hwpage_cnt) { |
1847 | ehca_gen_err( | 1847 | ehca_gen_err( |
1848 | "invalid alignment " | 1848 | "invalid alignment " |
1849 | "pgaddr=%lx i=%x " | 1849 | "pgaddr=%llx i=%x " |
1850 | "mr_pgsize=%lx", | 1850 | "mr_pgsize=%llx", |
1851 | pgaddr, i, | 1851 | pgaddr, i, |
1852 | pginfo->hwpage_size); | 1852 | pginfo->hwpage_size); |
1853 | ret = -EFAULT; | 1853 | ret = -EFAULT; |
@@ -1866,8 +1866,8 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo, | |||
1866 | if (ehca_debug_level >= 3) { | 1866 | if (ehca_debug_level >= 3) { |
1867 | u64 val = *(u64 *)abs_to_virt( | 1867 | u64 val = *(u64 *)abs_to_virt( |
1868 | phys_to_abs(pgaddr)); | 1868 | phys_to_abs(pgaddr)); |
1869 | ehca_gen_dbg("kpage=%lx chunk_page=%lx " | 1869 | ehca_gen_dbg("kpage=%llx chunk_page=%llx " |
1870 | "value=%016lx", | 1870 | "value=%016llx", |
1871 | *kpage, pgaddr, val); | 1871 | *kpage, pgaddr, val); |
1872 | } | 1872 | } |
1873 | prev_pgaddr = pgaddr; | 1873 | prev_pgaddr = pgaddr; |
@@ -1944,9 +1944,9 @@ static int ehca_set_pagebuf_phys(struct ehca_mr_pginfo *pginfo, | |||
1944 | if ((pginfo->kpage_cnt >= pginfo->num_kpages) || | 1944 | if ((pginfo->kpage_cnt >= pginfo->num_kpages) || |
1945 | (pginfo->hwpage_cnt >= pginfo->num_hwpages)) { | 1945 | (pginfo->hwpage_cnt >= pginfo->num_hwpages)) { |
1946 | ehca_gen_err("kpage_cnt >= num_kpages, " | 1946 | ehca_gen_err("kpage_cnt >= num_kpages, " |
1947 | "kpage_cnt=%lx num_kpages=%lx " | 1947 | "kpage_cnt=%llx num_kpages=%llx " |
1948 | "hwpage_cnt=%lx " | 1948 | "hwpage_cnt=%llx " |
1949 | "num_hwpages=%lx i=%x", | 1949 | "num_hwpages=%llx i=%x", |
1950 | pginfo->kpage_cnt, | 1950 | pginfo->kpage_cnt, |
1951 | pginfo->num_kpages, | 1951 | pginfo->num_kpages, |
1952 | pginfo->hwpage_cnt, | 1952 | pginfo->hwpage_cnt, |
@@ -1957,8 +1957,8 @@ static int ehca_set_pagebuf_phys(struct ehca_mr_pginfo *pginfo, | |||
1957 | (pbuf->addr & ~(pginfo->hwpage_size - 1)) + | 1957 | (pbuf->addr & ~(pginfo->hwpage_size - 1)) + |
1958 | (pginfo->next_hwpage * pginfo->hwpage_size)); | 1958 | (pginfo->next_hwpage * pginfo->hwpage_size)); |
1959 | if ( !(*kpage) && pbuf->addr ) { | 1959 | if ( !(*kpage) && pbuf->addr ) { |
1960 | ehca_gen_err("pbuf->addr=%lx pbuf->size=%lx " | 1960 | ehca_gen_err("pbuf->addr=%llx pbuf->size=%llx " |
1961 | "next_hwpage=%lx", pbuf->addr, | 1961 | "next_hwpage=%llx", pbuf->addr, |
1962 | pbuf->size, pginfo->next_hwpage); | 1962 | pbuf->size, pginfo->next_hwpage); |
1963 | return -EFAULT; | 1963 | return -EFAULT; |
1964 | } | 1964 | } |
@@ -1996,8 +1996,8 @@ static int ehca_set_pagebuf_fmr(struct ehca_mr_pginfo *pginfo, | |||
1996 | *kpage = phys_to_abs((*fmrlist & ~(pginfo->hwpage_size - 1)) + | 1996 | *kpage = phys_to_abs((*fmrlist & ~(pginfo->hwpage_size - 1)) + |
1997 | pginfo->next_hwpage * pginfo->hwpage_size); | 1997 | pginfo->next_hwpage * pginfo->hwpage_size); |
1998 | if ( !(*kpage) ) { | 1998 | if ( !(*kpage) ) { |
1999 | ehca_gen_err("*fmrlist=%lx fmrlist=%p " | 1999 | ehca_gen_err("*fmrlist=%llx fmrlist=%p " |
2000 | "next_listelem=%lx next_hwpage=%lx", | 2000 | "next_listelem=%llx next_hwpage=%llx", |
2001 | *fmrlist, fmrlist, | 2001 | *fmrlist, fmrlist, |
2002 | pginfo->u.fmr.next_listelem, | 2002 | pginfo->u.fmr.next_listelem, |
2003 | pginfo->next_hwpage); | 2003 | pginfo->next_hwpage); |
@@ -2025,7 +2025,7 @@ static int ehca_set_pagebuf_fmr(struct ehca_mr_pginfo *pginfo, | |||
2025 | ~(pginfo->hwpage_size - 1)); | 2025 | ~(pginfo->hwpage_size - 1)); |
2026 | if (prev + pginfo->u.fmr.fmr_pgsize != p) { | 2026 | if (prev + pginfo->u.fmr.fmr_pgsize != p) { |
2027 | ehca_gen_err("uncontiguous fmr pages " | 2027 | ehca_gen_err("uncontiguous fmr pages " |
2028 | "found prev=%lx p=%lx " | 2028 | "found prev=%llx p=%llx " |
2029 | "idx=%x", prev, p, i + j); | 2029 | "idx=%x", prev, p, i + j); |
2030 | return -EINVAL; | 2030 | return -EINVAL; |
2031 | } | 2031 | } |