aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2012-07-25 17:19:55 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-05 01:18:46 -0400
commit67e1dbcb1f6058c309e465f212466bbbb2325a88 (patch)
treee0e890ef50a0502fc3168bf81550091da59baebb /drivers/net/ethernet/ibm
parent48817c58066fe61d3dde100e2c0dd7054418ee92 (diff)
ehea: Remove uses of virt_to_abs() and abs_to_virt()
abs_to_virt() simply calls __va() and we'd like to get rid of it, so replace all abs_to_virt() uses with __va(). Similarly virt_to_abs() just calls __pa(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea.h1
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_phyp.c12
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_qmr.c14
3 files changed, 13 insertions, 14 deletions
diff --git a/drivers/net/ethernet/ibm/ehea/ehea.h b/drivers/net/ethernet/ibm/ehea/ehea.h
index b8e46cc31e53..6be7b9839f35 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea.h
+++ b/drivers/net/ethernet/ibm/ehea/ehea.h
@@ -35,7 +35,6 @@
35#include <linux/if_vlan.h> 35#include <linux/if_vlan.h>
36 36
37#include <asm/ibmebus.h> 37#include <asm/ibmebus.h>
38#include <asm/abs_addr.h>
39#include <asm/io.h> 38#include <asm/io.h>
40 39
41#define DRV_NAME "ehea" 40#define DRV_NAME "ehea"
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_phyp.c b/drivers/net/ethernet/ibm/ehea/ehea_phyp.c
index 30f903332e92..d3a130ccdcc8 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_phyp.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_phyp.c
@@ -141,7 +141,7 @@ u64 ehea_h_query_ehea_qp(const u64 adapter_handle, const u8 qp_category,
141 qp_category, /* R5 */ 141 qp_category, /* R5 */
142 qp_handle, /* R6 */ 142 qp_handle, /* R6 */
143 sel_mask, /* R7 */ 143 sel_mask, /* R7 */
144 virt_to_abs(cb_addr), /* R8 */ 144 __pa(cb_addr), /* R8 */
145 0, 0); 145 0, 0);
146} 146}
147 147
@@ -415,7 +415,7 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle, const u8 cat,
415 (u64) cat, /* R5 */ 415 (u64) cat, /* R5 */
416 qp_handle, /* R6 */ 416 qp_handle, /* R6 */
417 sel_mask, /* R7 */ 417 sel_mask, /* R7 */
418 virt_to_abs(cb_addr), /* R8 */ 418 __pa(cb_addr), /* R8 */
419 0, 0, 0, 0); /* R9-R12 */ 419 0, 0, 0, 0); /* R9-R12 */
420 420
421 *inv_attr_id = outs[0]; 421 *inv_attr_id = outs[0];
@@ -528,7 +528,7 @@ u64 ehea_h_query_ehea(const u64 adapter_handle, void *cb_addr)
528{ 528{
529 u64 hret, cb_logaddr; 529 u64 hret, cb_logaddr;
530 530
531 cb_logaddr = virt_to_abs(cb_addr); 531 cb_logaddr = __pa(cb_addr);
532 532
533 hret = ehea_plpar_hcall_norets(H_QUERY_HEA, 533 hret = ehea_plpar_hcall_norets(H_QUERY_HEA,
534 adapter_handle, /* R4 */ 534 adapter_handle, /* R4 */
@@ -545,7 +545,7 @@ u64 ehea_h_query_ehea_port(const u64 adapter_handle, const u16 port_num,
545 void *cb_addr) 545 void *cb_addr)
546{ 546{
547 u64 port_info; 547 u64 port_info;
548 u64 cb_logaddr = virt_to_abs(cb_addr); 548 u64 cb_logaddr = __pa(cb_addr);
549 u64 arr_index = 0; 549 u64 arr_index = 0;
550 550
551 port_info = EHEA_BMASK_SET(H_MEHEAPORT_CAT, cb_cat) 551 port_info = EHEA_BMASK_SET(H_MEHEAPORT_CAT, cb_cat)
@@ -567,7 +567,7 @@ u64 ehea_h_modify_ehea_port(const u64 adapter_handle, const u16 port_num,
567 unsigned long outs[PLPAR_HCALL9_BUFSIZE]; 567 unsigned long outs[PLPAR_HCALL9_BUFSIZE];
568 u64 port_info; 568 u64 port_info;
569 u64 arr_index = 0; 569 u64 arr_index = 0;
570 u64 cb_logaddr = virt_to_abs(cb_addr); 570 u64 cb_logaddr = __pa(cb_addr);
571 571
572 port_info = EHEA_BMASK_SET(H_MEHEAPORT_CAT, cb_cat) 572 port_info = EHEA_BMASK_SET(H_MEHEAPORT_CAT, cb_cat)
573 | EHEA_BMASK_SET(H_MEHEAPORT_PN, port_num); 573 | EHEA_BMASK_SET(H_MEHEAPORT_PN, port_num);
@@ -621,6 +621,6 @@ u64 ehea_h_error_data(const u64 adapter_handle, const u64 ressource_handle,
621 return ehea_plpar_hcall_norets(H_ERROR_DATA, 621 return ehea_plpar_hcall_norets(H_ERROR_DATA,
622 adapter_handle, /* R4 */ 622 adapter_handle, /* R4 */
623 ressource_handle, /* R5 */ 623 ressource_handle, /* R5 */
624 virt_to_abs(rblock), /* R6 */ 624 __pa(rblock), /* R6 */
625 0, 0, 0, 0); /* R7-R12 */ 625 0, 0, 0, 0); /* R7-R12 */
626} 626}
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
index cb66f574dc97..27f881758d16 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c
@@ -163,7 +163,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
163 goto out_kill_hwq; 163 goto out_kill_hwq;
164 } 164 }
165 165
166 rpage = virt_to_abs(vpage); 166 rpage = __pa(vpage);
167 hret = ehea_h_register_rpage(adapter->handle, 167 hret = ehea_h_register_rpage(adapter->handle,
168 0, EHEA_CQ_REGISTER_ORIG, 168 0, EHEA_CQ_REGISTER_ORIG,
169 cq->fw_handle, rpage, 1); 169 cq->fw_handle, rpage, 1);
@@ -290,7 +290,7 @@ struct ehea_eq *ehea_create_eq(struct ehea_adapter *adapter,
290 goto out_kill_hwq; 290 goto out_kill_hwq;
291 } 291 }
292 292
293 rpage = virt_to_abs(vpage); 293 rpage = __pa(vpage);
294 294
295 hret = ehea_h_register_rpage(adapter->handle, 0, 295 hret = ehea_h_register_rpage(adapter->handle, 0,
296 EHEA_EQ_REGISTER_ORIG, 296 EHEA_EQ_REGISTER_ORIG,
@@ -395,7 +395,7 @@ static int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue,
395 pr_err("hw_qpageit_get_inc failed\n"); 395 pr_err("hw_qpageit_get_inc failed\n");
396 goto out_kill_hwq; 396 goto out_kill_hwq;
397 } 397 }
398 rpage = virt_to_abs(vpage); 398 rpage = __pa(vpage);
399 hret = ehea_h_register_rpage(adapter->handle, 399 hret = ehea_h_register_rpage(adapter->handle,
400 0, h_call_q_selector, 400 0, h_call_q_selector,
401 qp->fw_handle, rpage, 1); 401 qp->fw_handle, rpage, 1);
@@ -790,7 +790,7 @@ u64 ehea_map_vaddr(void *caddr)
790 if (!ehea_bmap) 790 if (!ehea_bmap)
791 return EHEA_INVAL_ADDR; 791 return EHEA_INVAL_ADDR;
792 792
793 index = virt_to_abs(caddr) >> SECTION_SIZE_BITS; 793 index = __pa(caddr) >> SECTION_SIZE_BITS;
794 top = (index >> EHEA_TOP_INDEX_SHIFT) & EHEA_INDEX_MASK; 794 top = (index >> EHEA_TOP_INDEX_SHIFT) & EHEA_INDEX_MASK;
795 if (!ehea_bmap->top[top]) 795 if (!ehea_bmap->top[top])
796 return EHEA_INVAL_ADDR; 796 return EHEA_INVAL_ADDR;
@@ -812,7 +812,7 @@ static inline void *ehea_calc_sectbase(int top, int dir, int idx)
812 unsigned long ret = idx; 812 unsigned long ret = idx;
813 ret |= dir << EHEA_DIR_INDEX_SHIFT; 813 ret |= dir << EHEA_DIR_INDEX_SHIFT;
814 ret |= top << EHEA_TOP_INDEX_SHIFT; 814 ret |= top << EHEA_TOP_INDEX_SHIFT;
815 return abs_to_virt(ret << SECTION_SIZE_BITS); 815 return __va(ret << SECTION_SIZE_BITS);
816} 816}
817 817
818static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt, 818static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt,
@@ -822,7 +822,7 @@ static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt,
822 void *pg; 822 void *pg;
823 u64 j, m, hret; 823 u64 j, m, hret;
824 unsigned long k = 0; 824 unsigned long k = 0;
825 u64 pt_abs = virt_to_abs(pt); 825 u64 pt_abs = __pa(pt);
826 826
827 void *sectbase = ehea_calc_sectbase(top, dir, idx); 827 void *sectbase = ehea_calc_sectbase(top, dir, idx);
828 828
@@ -830,7 +830,7 @@ static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt,
830 830
831 for (m = 0; m < EHEA_MAX_RPAGE; m++) { 831 for (m = 0; m < EHEA_MAX_RPAGE; m++) {
832 pg = sectbase + ((k++) * EHEA_PAGESIZE); 832 pg = sectbase + ((k++) * EHEA_PAGESIZE);
833 pt[m] = virt_to_abs(pg); 833 pt[m] = __pa(pg);
834 } 834 }
835 hret = ehea_h_register_rpage_mr(adapter->handle, mr->handle, 0, 835 hret = ehea_h_register_rpage_mr(adapter->handle, mr->handle, 0,
836 0, pt_abs, EHEA_MAX_RPAGE); 836 0, pt_abs, EHEA_MAX_RPAGE);