diff options
Diffstat (limited to 'drivers/infiniband/hw/ehca/hcp_if.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/hcp_if.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/hcp_if.c b/drivers/infiniband/hw/ehca/hcp_if.c index 3394e05f4b4f..358796ccf008 100644 --- a/drivers/infiniband/hw/ehca/hcp_if.c +++ b/drivers/infiniband/hw/ehca/hcp_if.c | |||
@@ -427,7 +427,8 @@ u64 hipz_h_register_rpage(const struct ipz_adapter_handle adapter_handle, | |||
427 | { | 427 | { |
428 | return ehca_plpar_hcall_norets(H_REGISTER_RPAGES, | 428 | return ehca_plpar_hcall_norets(H_REGISTER_RPAGES, |
429 | adapter_handle.handle, /* r4 */ | 429 | adapter_handle.handle, /* r4 */ |
430 | queue_type | pagesize << 8, /* r5 */ | 430 | (u64)queue_type | ((u64)pagesize) << 8, |
431 | /* r5 */ | ||
431 | resource_handle, /* r6 */ | 432 | resource_handle, /* r6 */ |
432 | logical_address_of_page, /* r7 */ | 433 | logical_address_of_page, /* r7 */ |
433 | count, /* r8 */ | 434 | count, /* r8 */ |
@@ -724,6 +725,9 @@ u64 hipz_h_alloc_resource_mr(const struct ipz_adapter_handle adapter_handle, | |||
724 | u64 ret; | 725 | u64 ret; |
725 | u64 outs[PLPAR_HCALL9_BUFSIZE]; | 726 | u64 outs[PLPAR_HCALL9_BUFSIZE]; |
726 | 727 | ||
728 | ehca_gen_dbg("kernel PAGE_SIZE=%x access_ctrl=%016x " | ||
729 | "vaddr=%lx length=%lx", | ||
730 | (u32)PAGE_SIZE, access_ctrl, vaddr, length); | ||
727 | ret = ehca_plpar_hcall9(H_ALLOC_RESOURCE, outs, | 731 | ret = ehca_plpar_hcall9(H_ALLOC_RESOURCE, outs, |
728 | adapter_handle.handle, /* r4 */ | 732 | adapter_handle.handle, /* r4 */ |
729 | 5, /* r5 */ | 733 | 5, /* r5 */ |
@@ -746,8 +750,22 @@ u64 hipz_h_register_rpage_mr(const struct ipz_adapter_handle adapter_handle, | |||
746 | const u64 logical_address_of_page, | 750 | const u64 logical_address_of_page, |
747 | const u64 count) | 751 | const u64 count) |
748 | { | 752 | { |
753 | extern int ehca_debug_level; | ||
749 | u64 ret; | 754 | u64 ret; |
750 | 755 | ||
756 | if (unlikely(ehca_debug_level >= 2)) { | ||
757 | if (count > 1) { | ||
758 | u64 *kpage; | ||
759 | int i; | ||
760 | kpage = (u64 *)abs_to_virt(logical_address_of_page); | ||
761 | for (i = 0; i < count; i++) | ||
762 | ehca_gen_dbg("kpage[%d]=%p", | ||
763 | i, (void *)kpage[i]); | ||
764 | } else | ||
765 | ehca_gen_dbg("kpage=%p", | ||
766 | (void *)logical_address_of_page); | ||
767 | } | ||
768 | |||
751 | if ((count > 1) && (logical_address_of_page & (EHCA_PAGESIZE-1))) { | 769 | if ((count > 1) && (logical_address_of_page & (EHCA_PAGESIZE-1))) { |
752 | ehca_gen_err("logical_address_of_page not on a 4k boundary " | 770 | ehca_gen_err("logical_address_of_page not on a 4k boundary " |
753 | "adapter_handle=%lx mr=%p mr_handle=%lx " | 771 | "adapter_handle=%lx mr=%p mr_handle=%lx " |