diff options
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_cq.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_eq.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_mrmw.c | 45 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_qp.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_reqs.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_tools.h | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/hcp_if.c | 12 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ipz_pt_fn.c | 2 |
8 files changed, 33 insertions, 39 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c index d9b0ebcb67d7..8f5290147e8a 100644 --- a/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/drivers/infiniband/hw/ehca/ehca_cq.c | |||
@@ -220,7 +220,7 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector, | |||
220 | cq = ERR_PTR(-EAGAIN); | 220 | cq = ERR_PTR(-EAGAIN); |
221 | goto create_cq_exit4; | 221 | goto create_cq_exit4; |
222 | } | 222 | } |
223 | rpage = virt_to_abs(vpage); | 223 | rpage = __pa(vpage); |
224 | 224 | ||
225 | h_ret = hipz_h_register_rpage_cq(adapter_handle, | 225 | h_ret = hipz_h_register_rpage_cq(adapter_handle, |
226 | my_cq->ipz_cq_handle, | 226 | my_cq->ipz_cq_handle, |
diff --git a/drivers/infiniband/hw/ehca/ehca_eq.c b/drivers/infiniband/hw/ehca/ehca_eq.c index 818d721fc448..90da6747d395 100644 --- a/drivers/infiniband/hw/ehca/ehca_eq.c +++ b/drivers/infiniband/hw/ehca/ehca_eq.c | |||
@@ -101,7 +101,7 @@ int ehca_create_eq(struct ehca_shca *shca, | |||
101 | if (!vpage) | 101 | if (!vpage) |
102 | goto create_eq_exit2; | 102 | goto create_eq_exit2; |
103 | 103 | ||
104 | rpage = virt_to_abs(vpage); | 104 | rpage = __pa(vpage); |
105 | h_ret = hipz_h_register_rpage_eq(shca->ipz_hca_handle, | 105 | h_ret = hipz_h_register_rpage_eq(shca->ipz_hca_handle, |
106 | eq->ipz_eq_handle, | 106 | eq->ipz_eq_handle, |
107 | &eq->pf, | 107 | &eq->pf, |
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index b781b2cb0624..87844869dcc2 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c | |||
@@ -1136,7 +1136,7 @@ int ehca_reg_mr_rpages(struct ehca_shca *shca, | |||
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | if (rnum > 1) { | 1138 | if (rnum > 1) { |
1139 | rpage = virt_to_abs(kpage); | 1139 | rpage = __pa(kpage); |
1140 | if (!rpage) { | 1140 | if (!rpage) { |
1141 | ehca_err(&shca->ib_device, "kpage=%p i=%x", | 1141 | ehca_err(&shca->ib_device, "kpage=%p i=%x", |
1142 | kpage, i); | 1142 | kpage, i); |
@@ -1231,7 +1231,7 @@ inline int ehca_rereg_mr_rereg1(struct ehca_shca *shca, | |||
1231 | pginfo->num_kpages, pginfo->num_hwpages, kpage); | 1231 | pginfo->num_kpages, pginfo->num_hwpages, kpage); |
1232 | goto ehca_rereg_mr_rereg1_exit1; | 1232 | goto ehca_rereg_mr_rereg1_exit1; |
1233 | } | 1233 | } |
1234 | rpage = virt_to_abs(kpage); | 1234 | rpage = __pa(kpage); |
1235 | if (!rpage) { | 1235 | if (!rpage) { |
1236 | ehca_err(&shca->ib_device, "kpage=%p", kpage); | 1236 | ehca_err(&shca->ib_device, "kpage=%p", kpage); |
1237 | ret = -EFAULT; | 1237 | ret = -EFAULT; |
@@ -1525,7 +1525,7 @@ static inline void *ehca_calc_sectbase(int top, int dir, int idx) | |||
1525 | unsigned long ret = idx; | 1525 | unsigned long ret = idx; |
1526 | ret |= dir << EHCA_DIR_INDEX_SHIFT; | 1526 | ret |= dir << EHCA_DIR_INDEX_SHIFT; |
1527 | ret |= top << EHCA_TOP_INDEX_SHIFT; | 1527 | ret |= top << EHCA_TOP_INDEX_SHIFT; |
1528 | return abs_to_virt(ret << SECTION_SIZE_BITS); | 1528 | return __va(ret << SECTION_SIZE_BITS); |
1529 | } | 1529 | } |
1530 | 1530 | ||
1531 | #define ehca_bmap_valid(entry) \ | 1531 | #define ehca_bmap_valid(entry) \ |
@@ -1537,7 +1537,7 @@ static u64 ehca_reg_mr_section(int top, int dir, int idx, u64 *kpage, | |||
1537 | { | 1537 | { |
1538 | u64 h_ret = 0; | 1538 | u64 h_ret = 0; |
1539 | unsigned long page = 0; | 1539 | unsigned long page = 0; |
1540 | u64 rpage = virt_to_abs(kpage); | 1540 | u64 rpage = __pa(kpage); |
1541 | int page_count; | 1541 | int page_count; |
1542 | 1542 | ||
1543 | void *sectbase = ehca_calc_sectbase(top, dir, idx); | 1543 | void *sectbase = ehca_calc_sectbase(top, dir, idx); |
@@ -1553,7 +1553,7 @@ static u64 ehca_reg_mr_section(int top, int dir, int idx, u64 *kpage, | |||
1553 | for (rnum = 0; (rnum < MAX_RPAGES) && (page < page_count); | 1553 | for (rnum = 0; (rnum < MAX_RPAGES) && (page < page_count); |
1554 | rnum++) { | 1554 | rnum++) { |
1555 | void *pg = sectbase + ((page++) * pginfo->hwpage_size); | 1555 | void *pg = sectbase + ((page++) * pginfo->hwpage_size); |
1556 | kpage[rnum] = virt_to_abs(pg); | 1556 | kpage[rnum] = __pa(pg); |
1557 | } | 1557 | } |
1558 | 1558 | ||
1559 | h_ret = hipz_h_register_rpage_mr(shca->ipz_hca_handle, mr, | 1559 | h_ret = hipz_h_register_rpage_mr(shca->ipz_hca_handle, mr, |
@@ -1870,9 +1870,8 @@ static int ehca_set_pagebuf_user1(struct ehca_mr_pginfo *pginfo, | |||
1870 | for (i = pginfo->u.usr.next_nmap; i < chunk->nmap; ) { | 1870 | for (i = pginfo->u.usr.next_nmap; i < chunk->nmap; ) { |
1871 | pgaddr = page_to_pfn(sg_page(&chunk->page_list[i])) | 1871 | pgaddr = page_to_pfn(sg_page(&chunk->page_list[i])) |
1872 | << PAGE_SHIFT ; | 1872 | << PAGE_SHIFT ; |
1873 | *kpage = phys_to_abs(pgaddr + | 1873 | *kpage = pgaddr + (pginfo->next_hwpage * |
1874 | (pginfo->next_hwpage * | 1874 | pginfo->hwpage_size); |
1875 | pginfo->hwpage_size)); | ||
1876 | if ( !(*kpage) ) { | 1875 | if ( !(*kpage) ) { |
1877 | ehca_gen_err("pgaddr=%llx " | 1876 | ehca_gen_err("pgaddr=%llx " |
1878 | "chunk->page_list[i]=%llx " | 1877 | "chunk->page_list[i]=%llx " |
@@ -1927,7 +1926,7 @@ static int ehca_check_kpages_per_ate(struct scatterlist *page_list, | |||
1927 | u64 pgaddr = page_to_pfn(sg_page(&page_list[t])) << PAGE_SHIFT; | 1926 | u64 pgaddr = page_to_pfn(sg_page(&page_list[t])) << PAGE_SHIFT; |
1928 | if (ehca_debug_level >= 3) | 1927 | if (ehca_debug_level >= 3) |
1929 | ehca_gen_dbg("chunk_page=%llx value=%016llx", pgaddr, | 1928 | ehca_gen_dbg("chunk_page=%llx value=%016llx", pgaddr, |
1930 | *(u64 *)abs_to_virt(phys_to_abs(pgaddr))); | 1929 | *(u64 *)__va(pgaddr)); |
1931 | if (pgaddr - PAGE_SIZE != *prev_pgaddr) { | 1930 | if (pgaddr - PAGE_SIZE != *prev_pgaddr) { |
1932 | ehca_gen_err("uncontiguous page found pgaddr=%llx " | 1931 | ehca_gen_err("uncontiguous page found pgaddr=%llx " |
1933 | "prev_pgaddr=%llx page_list_i=%x", | 1932 | "prev_pgaddr=%llx page_list_i=%x", |
@@ -1962,7 +1961,7 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo, | |||
1962 | if (nr_kpages == kpages_per_hwpage) { | 1961 | if (nr_kpages == kpages_per_hwpage) { |
1963 | pgaddr = ( page_to_pfn(sg_page(&chunk->page_list[i])) | 1962 | pgaddr = ( page_to_pfn(sg_page(&chunk->page_list[i])) |
1964 | << PAGE_SHIFT ); | 1963 | << PAGE_SHIFT ); |
1965 | *kpage = phys_to_abs(pgaddr); | 1964 | *kpage = pgaddr; |
1966 | if ( !(*kpage) ) { | 1965 | if ( !(*kpage) ) { |
1967 | ehca_gen_err("pgaddr=%llx i=%x", | 1966 | ehca_gen_err("pgaddr=%llx i=%x", |
1968 | pgaddr, i); | 1967 | pgaddr, i); |
@@ -1990,13 +1989,11 @@ static int ehca_set_pagebuf_user2(struct ehca_mr_pginfo *pginfo, | |||
1990 | (pginfo->hwpage_size - 1)) >> | 1989 | (pginfo->hwpage_size - 1)) >> |
1991 | PAGE_SHIFT; | 1990 | PAGE_SHIFT; |
1992 | nr_kpages -= pginfo->kpage_cnt; | 1991 | nr_kpages -= pginfo->kpage_cnt; |
1993 | *kpage = phys_to_abs( | 1992 | *kpage = pgaddr & |
1994 | pgaddr & | 1993 | ~(pginfo->hwpage_size - 1); |
1995 | ~(pginfo->hwpage_size - 1)); | ||
1996 | } | 1994 | } |
1997 | if (ehca_debug_level >= 3) { | 1995 | if (ehca_debug_level >= 3) { |
1998 | u64 val = *(u64 *)abs_to_virt( | 1996 | u64 val = *(u64 *)__va(pgaddr); |
1999 | phys_to_abs(pgaddr)); | ||
2000 | ehca_gen_dbg("kpage=%llx chunk_page=%llx " | 1997 | ehca_gen_dbg("kpage=%llx chunk_page=%llx " |
2001 | "value=%016llx", | 1998 | "value=%016llx", |
2002 | *kpage, pgaddr, val); | 1999 | *kpage, pgaddr, val); |
@@ -2084,9 +2081,8 @@ static int ehca_set_pagebuf_phys(struct ehca_mr_pginfo *pginfo, | |||
2084 | pginfo->num_hwpages, i); | 2081 | pginfo->num_hwpages, i); |
2085 | return -EFAULT; | 2082 | return -EFAULT; |
2086 | } | 2083 | } |
2087 | *kpage = phys_to_abs( | 2084 | *kpage = (pbuf->addr & ~(pginfo->hwpage_size - 1)) + |
2088 | (pbuf->addr & ~(pginfo->hwpage_size - 1)) + | 2085 | (pginfo->next_hwpage * pginfo->hwpage_size); |
2089 | (pginfo->next_hwpage * pginfo->hwpage_size)); | ||
2090 | if ( !(*kpage) && pbuf->addr ) { | 2086 | if ( !(*kpage) && pbuf->addr ) { |
2091 | ehca_gen_err("pbuf->addr=%llx pbuf->size=%llx " | 2087 | ehca_gen_err("pbuf->addr=%llx pbuf->size=%llx " |
2092 | "next_hwpage=%llx", pbuf->addr, | 2088 | "next_hwpage=%llx", pbuf->addr, |
@@ -2124,8 +2120,8 @@ static int ehca_set_pagebuf_fmr(struct ehca_mr_pginfo *pginfo, | |||
2124 | /* loop over desired page_list entries */ | 2120 | /* loop over desired page_list entries */ |
2125 | fmrlist = pginfo->u.fmr.page_list + pginfo->u.fmr.next_listelem; | 2121 | fmrlist = pginfo->u.fmr.page_list + pginfo->u.fmr.next_listelem; |
2126 | for (i = 0; i < number; i++) { | 2122 | for (i = 0; i < number; i++) { |
2127 | *kpage = phys_to_abs((*fmrlist & ~(pginfo->hwpage_size - 1)) + | 2123 | *kpage = (*fmrlist & ~(pginfo->hwpage_size - 1)) + |
2128 | pginfo->next_hwpage * pginfo->hwpage_size); | 2124 | pginfo->next_hwpage * pginfo->hwpage_size; |
2129 | if ( !(*kpage) ) { | 2125 | if ( !(*kpage) ) { |
2130 | ehca_gen_err("*fmrlist=%llx fmrlist=%p " | 2126 | ehca_gen_err("*fmrlist=%llx fmrlist=%p " |
2131 | "next_listelem=%llx next_hwpage=%llx", | 2127 | "next_listelem=%llx next_hwpage=%llx", |
@@ -2152,8 +2148,7 @@ static int ehca_set_pagebuf_fmr(struct ehca_mr_pginfo *pginfo, | |||
2152 | u64 prev = *kpage; | 2148 | u64 prev = *kpage; |
2153 | /* check if adrs are contiguous */ | 2149 | /* check if adrs are contiguous */ |
2154 | for (j = 1; j < cnt_per_hwpage; j++) { | 2150 | for (j = 1; j < cnt_per_hwpage; j++) { |
2155 | u64 p = phys_to_abs(fmrlist[j] & | 2151 | u64 p = fmrlist[j] & ~(pginfo->hwpage_size - 1); |
2156 | ~(pginfo->hwpage_size - 1)); | ||
2157 | if (prev + pginfo->u.fmr.fmr_pgsize != p) { | 2152 | if (prev + pginfo->u.fmr.fmr_pgsize != p) { |
2158 | ehca_gen_err("uncontiguous fmr pages " | 2153 | ehca_gen_err("uncontiguous fmr pages " |
2159 | "found prev=%llx p=%llx " | 2154 | "found prev=%llx p=%llx " |
@@ -2388,8 +2383,8 @@ static int ehca_update_busmap(unsigned long pfn, unsigned long nr_pages) | |||
2388 | memset(ehca_bmap, 0xFF, EHCA_TOP_MAP_SIZE); | 2383 | memset(ehca_bmap, 0xFF, EHCA_TOP_MAP_SIZE); |
2389 | } | 2384 | } |
2390 | 2385 | ||
2391 | start_section = phys_to_abs(pfn * PAGE_SIZE) / EHCA_SECTSIZE; | 2386 | start_section = (pfn * PAGE_SIZE) / EHCA_SECTSIZE; |
2392 | end_section = phys_to_abs((pfn + nr_pages) * PAGE_SIZE) / EHCA_SECTSIZE; | 2387 | end_section = ((pfn + nr_pages) * PAGE_SIZE) / EHCA_SECTSIZE; |
2393 | for (i = start_section; i < end_section; i++) { | 2388 | for (i = start_section; i < end_section; i++) { |
2394 | int ret; | 2389 | int ret; |
2395 | top = ehca_calc_index(i, EHCA_TOP_INDEX_SHIFT); | 2390 | top = ehca_calc_index(i, EHCA_TOP_INDEX_SHIFT); |
@@ -2508,7 +2503,7 @@ static u64 ehca_map_vaddr(void *caddr) | |||
2508 | if (!ehca_bmap) | 2503 | if (!ehca_bmap) |
2509 | return EHCA_INVAL_ADDR; | 2504 | return EHCA_INVAL_ADDR; |
2510 | 2505 | ||
2511 | abs_addr = virt_to_abs(caddr); | 2506 | abs_addr = __pa(caddr); |
2512 | top = ehca_calc_index(abs_addr, EHCA_TOP_INDEX_SHIFT + EHCA_SECTSHIFT); | 2507 | top = ehca_calc_index(abs_addr, EHCA_TOP_INDEX_SHIFT + EHCA_SECTSHIFT); |
2513 | if (!ehca_bmap_valid(ehca_bmap->top[top])) | 2508 | if (!ehca_bmap_valid(ehca_bmap->top[top])) |
2514 | return EHCA_INVAL_ADDR; | 2509 | return EHCA_INVAL_ADDR; |
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index 964f85520798..149393915ae5 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -321,7 +321,7 @@ static inline int init_qp_queue(struct ehca_shca *shca, | |||
321 | ret = -EINVAL; | 321 | ret = -EINVAL; |
322 | goto init_qp_queue1; | 322 | goto init_qp_queue1; |
323 | } | 323 | } |
324 | rpage = virt_to_abs(vpage); | 324 | rpage = __pa(vpage); |
325 | 325 | ||
326 | h_ret = hipz_h_register_rpage_qp(ipz_hca_handle, | 326 | h_ret = hipz_h_register_rpage_qp(ipz_hca_handle, |
327 | my_qp->ipz_qp_handle, | 327 | my_qp->ipz_qp_handle, |
@@ -1094,7 +1094,7 @@ static int prepare_sqe_rts(struct ehca_qp *my_qp, struct ehca_shca *shca, | |||
1094 | ehca_dbg(&shca->ib_device, "qp_num=%x bad_send_wqe_p=%p", | 1094 | ehca_dbg(&shca->ib_device, "qp_num=%x bad_send_wqe_p=%p", |
1095 | qp_num, bad_send_wqe_p); | 1095 | qp_num, bad_send_wqe_p); |
1096 | /* convert wqe pointer to vadr */ | 1096 | /* convert wqe pointer to vadr */ |
1097 | bad_send_wqe_v = abs_to_virt((u64)bad_send_wqe_p); | 1097 | bad_send_wqe_v = __va((u64)bad_send_wqe_p); |
1098 | if (ehca_debug_level >= 2) | 1098 | if (ehca_debug_level >= 2) |
1099 | ehca_dmp(bad_send_wqe_v, 32, "qp_num=%x bad_wqe", qp_num); | 1099 | ehca_dmp(bad_send_wqe_v, 32, "qp_num=%x bad_wqe", qp_num); |
1100 | squeue = &my_qp->ipz_squeue; | 1100 | squeue = &my_qp->ipz_squeue; |
@@ -1138,7 +1138,7 @@ static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue, | |||
1138 | /* convert real to abs address */ | 1138 | /* convert real to abs address */ |
1139 | wqe_p = wqe_p & (~(1UL << 63)); | 1139 | wqe_p = wqe_p & (~(1UL << 63)); |
1140 | 1140 | ||
1141 | wqe_v = abs_to_virt(wqe_p); | 1141 | wqe_v = __va(wqe_p); |
1142 | 1142 | ||
1143 | if (ipz_queue_abs_to_offset(ipz_queue, wqe_p, &q_ofs)) { | 1143 | if (ipz_queue_abs_to_offset(ipz_queue, wqe_p, &q_ofs)) { |
1144 | ehca_gen_err("Invalid offset for calculating left cqes " | 1144 | ehca_gen_err("Invalid offset for calculating left cqes " |
diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c index fd05f48f6b0b..47f94984353d 100644 --- a/drivers/infiniband/hw/ehca/ehca_reqs.c +++ b/drivers/infiniband/hw/ehca/ehca_reqs.c | |||
@@ -135,7 +135,7 @@ static void trace_send_wr_ud(const struct ib_send_wr *send_wr) | |||
135 | mad_hdr->attr_mod); | 135 | mad_hdr->attr_mod); |
136 | } | 136 | } |
137 | for (j = 0; j < send_wr->num_sge; j++) { | 137 | for (j = 0; j < send_wr->num_sge; j++) { |
138 | u8 *data = (u8 *)abs_to_virt(sge->addr); | 138 | u8 *data = __va(sge->addr); |
139 | ehca_gen_dbg("send_wr#%x sge#%x addr=%p length=%x " | 139 | ehca_gen_dbg("send_wr#%x sge#%x addr=%p length=%x " |
140 | "lkey=%x", | 140 | "lkey=%x", |
141 | idx, j, data, sge->length, sge->lkey); | 141 | idx, j, data, sge->length, sge->lkey); |
diff --git a/drivers/infiniband/hw/ehca/ehca_tools.h b/drivers/infiniband/hw/ehca/ehca_tools.h index 54c0d23bad92..d280b12aae64 100644 --- a/drivers/infiniband/hw/ehca/ehca_tools.h +++ b/drivers/infiniband/hw/ehca/ehca_tools.h | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <linux/device.h> | 59 | #include <linux/device.h> |
60 | 60 | ||
61 | #include <linux/atomic.h> | 61 | #include <linux/atomic.h> |
62 | #include <asm/abs_addr.h> | ||
63 | #include <asm/ibmebus.h> | 62 | #include <asm/ibmebus.h> |
64 | #include <asm/io.h> | 63 | #include <asm/io.h> |
65 | #include <asm/pgtable.h> | 64 | #include <asm/pgtable.h> |
diff --git a/drivers/infiniband/hw/ehca/hcp_if.c b/drivers/infiniband/hw/ehca/hcp_if.c index e6f9cdd94c7a..2d41d04fd959 100644 --- a/drivers/infiniband/hw/ehca/hcp_if.c +++ b/drivers/infiniband/hw/ehca/hcp_if.c | |||
@@ -396,7 +396,7 @@ u64 hipz_h_query_port(const struct ipz_adapter_handle adapter_handle, | |||
396 | struct hipz_query_port *query_port_response_block) | 396 | struct hipz_query_port *query_port_response_block) |
397 | { | 397 | { |
398 | u64 ret; | 398 | u64 ret; |
399 | u64 r_cb = virt_to_abs(query_port_response_block); | 399 | u64 r_cb = __pa(query_port_response_block); |
400 | 400 | ||
401 | if (r_cb & (EHCA_PAGESIZE-1)) { | 401 | if (r_cb & (EHCA_PAGESIZE-1)) { |
402 | ehca_gen_err("response block not page aligned"); | 402 | ehca_gen_err("response block not page aligned"); |
@@ -438,7 +438,7 @@ u64 hipz_h_modify_port(const struct ipz_adapter_handle adapter_handle, | |||
438 | u64 hipz_h_query_hca(const struct ipz_adapter_handle adapter_handle, | 438 | u64 hipz_h_query_hca(const struct ipz_adapter_handle adapter_handle, |
439 | struct hipz_query_hca *query_hca_rblock) | 439 | struct hipz_query_hca *query_hca_rblock) |
440 | { | 440 | { |
441 | u64 r_cb = virt_to_abs(query_hca_rblock); | 441 | u64 r_cb = __pa(query_hca_rblock); |
442 | 442 | ||
443 | if (r_cb & (EHCA_PAGESIZE-1)) { | 443 | if (r_cb & (EHCA_PAGESIZE-1)) { |
444 | ehca_gen_err("response_block=%p not page aligned", | 444 | ehca_gen_err("response_block=%p not page aligned", |
@@ -577,7 +577,7 @@ u64 hipz_h_modify_qp(const struct ipz_adapter_handle adapter_handle, | |||
577 | adapter_handle.handle, /* r4 */ | 577 | adapter_handle.handle, /* r4 */ |
578 | qp_handle.handle, /* r5 */ | 578 | qp_handle.handle, /* r5 */ |
579 | update_mask, /* r6 */ | 579 | update_mask, /* r6 */ |
580 | virt_to_abs(mqpcb), /* r7 */ | 580 | __pa(mqpcb), /* r7 */ |
581 | 0, 0, 0, 0, 0); | 581 | 0, 0, 0, 0, 0); |
582 | 582 | ||
583 | if (ret == H_NOT_ENOUGH_RESOURCES) | 583 | if (ret == H_NOT_ENOUGH_RESOURCES) |
@@ -595,7 +595,7 @@ u64 hipz_h_query_qp(const struct ipz_adapter_handle adapter_handle, | |||
595 | return ehca_plpar_hcall_norets(H_QUERY_QP, | 595 | return ehca_plpar_hcall_norets(H_QUERY_QP, |
596 | adapter_handle.handle, /* r4 */ | 596 | adapter_handle.handle, /* r4 */ |
597 | qp_handle.handle, /* r5 */ | 597 | qp_handle.handle, /* r5 */ |
598 | virt_to_abs(qqpcb), /* r6 */ | 598 | __pa(qqpcb), /* r6 */ |
599 | 0, 0, 0, 0); | 599 | 0, 0, 0, 0); |
600 | } | 600 | } |
601 | 601 | ||
@@ -787,7 +787,7 @@ u64 hipz_h_register_rpage_mr(const struct ipz_adapter_handle adapter_handle, | |||
787 | if (count > 1) { | 787 | if (count > 1) { |
788 | u64 *kpage; | 788 | u64 *kpage; |
789 | int i; | 789 | int i; |
790 | kpage = (u64 *)abs_to_virt(logical_address_of_page); | 790 | kpage = __va(logical_address_of_page); |
791 | for (i = 0; i < count; i++) | 791 | for (i = 0; i < count; i++) |
792 | ehca_gen_dbg("kpage[%d]=%p", | 792 | ehca_gen_dbg("kpage[%d]=%p", |
793 | i, (void *)kpage[i]); | 793 | i, (void *)kpage[i]); |
@@ -944,7 +944,7 @@ u64 hipz_h_error_data(const struct ipz_adapter_handle adapter_handle, | |||
944 | void *rblock, | 944 | void *rblock, |
945 | unsigned long *byte_count) | 945 | unsigned long *byte_count) |
946 | { | 946 | { |
947 | u64 r_cb = virt_to_abs(rblock); | 947 | u64 r_cb = __pa(rblock); |
948 | 948 | ||
949 | if (r_cb & (EHCA_PAGESIZE-1)) { | 949 | if (r_cb & (EHCA_PAGESIZE-1)) { |
950 | ehca_gen_err("rblock not page aligned."); | 950 | ehca_gen_err("rblock not page aligned."); |
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/drivers/infiniband/hw/ehca/ipz_pt_fn.c index 1898d6e7cce5..62c71fadb4d9 100644 --- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c +++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c | |||
@@ -81,7 +81,7 @@ int ipz_queue_abs_to_offset(struct ipz_queue *queue, u64 addr, u64 *q_offset) | |||
81 | { | 81 | { |
82 | int i; | 82 | int i; |
83 | for (i = 0; i < queue->queue_length / queue->pagesize; i++) { | 83 | for (i = 0; i < queue->queue_length / queue->pagesize; i++) { |
84 | u64 page = (u64)virt_to_abs(queue->queue_pages[i]); | 84 | u64 page = __pa(queue->queue_pages[i]); |
85 | if (addr >= page && addr < page + queue->pagesize) { | 85 | if (addr >= page && addr < page + queue->pagesize) { |
86 | *q_offset = addr - page + i * queue->pagesize; | 86 | *q_offset = addr - page + i * queue->pagesize; |
87 | return 0; | 87 | return 0; |