[ewg] [PATCH OFED-1.5] eHCA: SLES11 backports

Alexander Schmidt alexs at linux.vnet.ibm.com
Mon Jul 27 06:34:58 PDT 2009


Hi Vlad,

please apply the following patch to get our SLES11 backports.

Thanks,
Alex


Index: ofa_kernel-1.5.patch2/kernel_patches/backport/2.6.27_sles11/ehca-020-undo_unsigned_long.patch
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ofa_kernel-1.5.patch2/kernel_patches/backport/2.6.27_sles11/ehca-020-undo_unsigned_long.patch	2009-07-27 09:12:20.000000000 -0400
@@ -0,0 +1,1005 @@
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_cq.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_cq.c	2009-07-26 09:08:48.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_cq.c	2009-07-27 08:59:04.000000000 -0400
+@@ -196,7 +196,7 @@
+ 
+ 	if (h_ret != H_SUCCESS) {
+ 		ehca_err(device, "hipz_h_alloc_resource_cq() failed "
+-			 "h_ret=%lli device=%p", h_ret, device);
++			 "h_ret=%li device=%p", h_ret, device);
+ 		cq = ERR_PTR(ehca2ib_return_code(h_ret));
+ 		goto create_cq_exit2;
+ 	}
+@@ -232,7 +232,7 @@
+ 
+ 		if (h_ret < H_SUCCESS) {
+ 			ehca_err(device, "hipz_h_register_rpage_cq() failed "
+-				 "ehca_cq=%p cq_num=%x h_ret=%lli counter=%i "
++				 "ehca_cq=%p cq_num=%x h_ret=%li counter=%i "
+ 				 "act_pages=%i", my_cq, my_cq->cq_number,
+ 				 h_ret, counter, param.act_pages);
+ 			cq = ERR_PTR(-EINVAL);
+@@ -244,7 +244,7 @@
+ 			if ((h_ret != H_SUCCESS) || vpage) {
+ 				ehca_err(device, "Registration of pages not "
+ 					 "complete ehca_cq=%p cq_num=%x "
+-					 "h_ret=%lli", my_cq, my_cq->cq_number,
++					 "h_ret=%li", my_cq, my_cq->cq_number,
+ 					 h_ret);
+ 				cq = ERR_PTR(-EAGAIN);
+ 				goto create_cq_exit4;
+@@ -252,7 +252,7 @@
+ 		} else {
+ 			if (h_ret != H_PAGE_REGISTERED) {
+ 				ehca_err(device, "Registration of page failed "
+-					 "ehca_cq=%p cq_num=%x h_ret=%lli "
++					 "ehca_cq=%p cq_num=%x h_ret=%li "
+ 					 "counter=%i act_pages=%i",
+ 					 my_cq, my_cq->cq_number,
+ 					 h_ret, counter, param.act_pages);
+@@ -266,7 +266,7 @@
+ 
+ 	gal = my_cq->galpas.kernel;
+ 	cqx_fec = hipz_galpa_load(gal, CQTEMM_OFFSET(cqx_fec));
+-	ehca_dbg(device, "ehca_cq=%p cq_num=%x CQX_FEC=%llx",
++	ehca_dbg(device, "ehca_cq=%p cq_num=%x CQX_FEC=%lx",
+ 		 my_cq, my_cq->cq_number, cqx_fec);
+ 
+ 	my_cq->ib_cq.cqe = my_cq->nr_of_entries =
+@@ -307,7 +307,7 @@
+ 	h_ret = hipz_h_destroy_cq(adapter_handle, my_cq, 1);
+ 	if (h_ret != H_SUCCESS)
+ 		ehca_err(device, "hipz_h_destroy_cq() failed ehca_cq=%p "
+-			 "cq_num=%x h_ret=%lli", my_cq, my_cq->cq_number, h_ret);
++			 "cq_num=%x h_ret=%li", my_cq, my_cq->cq_number, h_ret);
+ 
+ create_cq_exit2:
+ 	write_lock_irqsave(&ehca_cq_idr_lock, flags);
+@@ -355,7 +355,7 @@
+ 	h_ret = hipz_h_destroy_cq(adapter_handle, my_cq, 0);
+ 	if (h_ret == H_R_STATE) {
+ 		/* cq in err: read err data and destroy it forcibly */
+-		ehca_dbg(device, "ehca_cq=%p cq_num=%x resource=%llx in err "
++		ehca_dbg(device, "ehca_cq=%p cq_num=%x ressource=%lx in err "
+ 			 "state. Try to delete it forcibly.",
+ 			 my_cq, cq_num, my_cq->ipz_cq_handle.handle);
+ 		ehca_error_data(shca, my_cq, my_cq->ipz_cq_handle.handle);
+@@ -365,7 +365,7 @@
+ 				 cq_num);
+ 	}
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(device, "hipz_h_destroy_cq() failed h_ret=%lli "
++		ehca_err(device, "hipz_h_destroy_cq() failed h_ret=%li "
+ 			 "ehca_cq=%p cq_num=%x", h_ret, my_cq, cq_num);
+ 		return ehca2ib_return_code(h_ret);
+ 	}
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_hca.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_hca.c	2009-07-26 09:08:48.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_hca.c	2009-07-27 08:59:04.000000000 -0400
+@@ -393,7 +393,7 @@
+ 	hret = hipz_h_modify_port(shca->ipz_hca_handle, port,
+ 				  cap, props->init_type, port_modify_mask);
+ 	if (hret != H_SUCCESS) {
+-		ehca_err(&shca->ib_device, "Modify port failed  h_ret=%lli",
++		ehca_err(&shca->ib_device, "Modify port failed  h_ret=%li",
+ 			 hret);
+ 		ret = -EINVAL;
+ 	}
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_irq.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_irq.c	2009-07-27 08:37:20.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_irq.c	2009-07-27 08:59:04.000000000 -0400
+@@ -99,7 +99,7 @@
+ 			return;
+ 
+ 		ehca_err(&shca->ib_device,
+-			 "QP 0x%x (resource=%llx) has errors.",
++			 "QP 0x%x (resource=%lx) has errors.",
+ 			 qp->ib_qp.qp_num, resource);
+ 		break;
+ 	}
+@@ -108,21 +108,21 @@
+ 		struct ehca_cq *cq = (struct ehca_cq *)data;
+ 
+ 		ehca_err(&shca->ib_device,
+-			 "CQ 0x%x (resource=%llx) has errors.",
++			 "CQ 0x%x (resource=%lx) has errors.",
+ 			 cq->cq_number, resource);
+ 		break;
+ 	}
+ 	default:
+ 		ehca_err(&shca->ib_device,
+-			 "Unknown error type: %llx on %s.",
++			 "Unknown error type: %lx on %s.",
+ 			 type, shca->ib_device.name);
+ 		break;
+ 	}
+ 
+-	ehca_err(&shca->ib_device, "Error data is available: %llx.", resource);
++	ehca_err(&shca->ib_device, "Error data is available: %lx.", resource);
+ 	ehca_err(&shca->ib_device, "EHCA ----- error data begin "
+ 		 "---------------------------------------------------");
+-	ehca_dmp(rblock, length, "resource=%llx", resource);
++	ehca_dmp(rblock, length, "resource=%lx", resource);
+ 	ehca_err(&shca->ib_device, "EHCA ----- error data end "
+ 		 "----------------------------------------------------");
+ 
+@@ -152,7 +152,7 @@
+ 
+ 	if (ret == H_R_STATE)
+ 		ehca_err(&shca->ib_device,
+-			 "No error data is available: %llx.", resource);
++			 "No error data is available: %lx.", resource);
+ 	else if (ret == H_SUCCESS) {
+ 		int length;
+ 
+@@ -164,7 +164,7 @@
+ 		print_error_data(shca, data, rblock, length);
+ 	} else
+ 		ehca_err(&shca->ib_device,
+-			 "Error data could not be fetched: %llx", resource);
++			 "Error data could not be fetched: %lx", resource);
+ 
+ 	ehca_free_fw_ctrlblock(rblock);
+ 
+@@ -514,7 +514,7 @@
+ 	struct ehca_cq *cq;
+ 
+ 	eqe_value = eqe->entry;
+-	ehca_dbg(&shca->ib_device, "eqe_value=%llx", eqe_value);
++	ehca_dbg(&shca->ib_device, "eqe_value=%lx", eqe_value);
+ 	if (EHCA_BMASK_GET(EQE_COMPLETION_EVENT, eqe_value)) {
+ 		ehca_dbg(&shca->ib_device, "Got completion event");
+ 		token = EHCA_BMASK_GET(EQE_CQ_TOKEN, eqe_value);
+@@ -603,7 +603,7 @@
+ 		ret = hipz_h_eoi(eq->ist);
+ 		if (ret != H_SUCCESS)
+ 			ehca_err(&shca->ib_device,
+-				 "bad return code EOI -rc = %lld\n", ret);
++				 "bad return code EOI -rc = %ld\n", ret);
+ 		ehca_dbg(&shca->ib_device, "deadman found %x eqe", eqe_cnt);
+ 	}
+ 	if (unlikely(eqe_cnt == EHCA_EQE_CACHE_SIZE))
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_main.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_main.c	2009-07-27 08:37:13.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_main.c	2009-07-27 08:59:04.000000000 -0400
+@@ -304,7 +304,7 @@
+ 
+ 	h_ret = hipz_h_query_hca(shca->ipz_hca_handle, rblock);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_gen_err("Cannot query device properties. h_ret=%lli",
++		ehca_gen_err("Cannot query device properties. h_ret=%li",
+ 			     h_ret);
+ 		ret = -EPERM;
+ 		goto sense_attributes1;
+@@ -391,7 +391,7 @@
+ 	port = (struct hipz_query_port *)rblock;
+ 	h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_gen_err("Cannot query port properties. h_ret=%lli",
++		ehca_gen_err("Cannot query port properties. h_ret=%li",
+ 			     h_ret);
+ 		ret = -EPERM;
+ 		goto sense_attributes1;
+@@ -683,7 +683,7 @@
+ {
+ 	struct ehca_shca *shca = dev->driver_data;
+ 
+-	return sprintf(buf, "%llx\n", shca->ipz_hca_handle.handle);
++	return sprintf(buf, "%lx\n", shca->ipz_hca_handle.handle);
+ 
+ }
+ static DEVICE_ATTR(adapter_handle, S_IRUGO, ehca_show_adapter_handle, NULL);
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_mcast.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_mcast.c	2009-07-26 09:08:48.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_mcast.c	2009-07-27 08:59:04.000000000 -0400
+@@ -88,7 +88,7 @@
+ 	if (h_ret != H_SUCCESS)
+ 		ehca_err(ibqp->device,
+ 			 "ehca_qp=%p qp_num=%x hipz_h_attach_mcqp() failed "
+-			 "h_ret=%lli", my_qp, ibqp->qp_num, h_ret);
++			 "h_ret=%li", my_qp, ibqp->qp_num, h_ret);
+ 
+ 	return ehca2ib_return_code(h_ret);
+ }
+@@ -125,7 +125,7 @@
+ 	if (h_ret != H_SUCCESS)
+ 		ehca_err(ibqp->device,
+ 			 "ehca_qp=%p qp_num=%x hipz_h_detach_mcqp() failed "
+-			 "h_ret=%lli", my_qp, ibqp->qp_num, h_ret);
++			 "h_ret=%li", my_qp, ibqp->qp_num, h_ret);
+ 
+ 	return ehca2ib_return_code(h_ret);
+ }
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_mrmw.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_mrmw.c	2009-07-27 08:37:13.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_mrmw.c	2009-07-27 09:09:45.000000000 -0400
+@@ -239,7 +239,7 @@
+ 	}
+ 	if ((size == 0) ||
+ 	    (((u64)iova_start + size) < (u64)iova_start)) {
+-		ehca_err(pd->device, "bad input values: size=%llx iova_start=%p",
++		ehca_err(pd->device, "bad input values: size=%lx iova_start=%p",
+ 			 size, iova_start);
+ 		ib_mr = ERR_PTR(-EINVAL);
+ 		goto reg_phys_mr_exit0;
+@@ -344,8 +344,8 @@
+ 	}
+ 
+ 	if (length == 0 || virt + length < virt) {
+-		ehca_err(pd->device, "bad input values: length=%llx "
+-			 "virt_base=%llx", length, virt);
++		ehca_err(pd->device, "bad input values: length=%lx "
++			 "virt_base=%lx", length, virt);
+ 		ib_mr = ERR_PTR(-EINVAL);
+ 		goto reg_user_mr_exit0;
+ 	}
+@@ -408,7 +408,7 @@
+ 			  &e_mr->ib.ib_mr.rkey, EHCA_REG_MR);
+ 	if (ret == -EINVAL && pginfo.hwpage_size > PAGE_SIZE) {
+ 		ehca_warn(pd->device, "failed to register mr "
+-			  "with hwpage_size=%llx", hwpage_size);
++			  "with hwpage_size=%lx", hwpage_size);
+ 		ehca_info(pd->device, "try to register mr with "
+ 			  "kpage_size=%lx", PAGE_SIZE);
+ 		/*
+@@ -544,7 +544,7 @@
+ 			goto rereg_phys_mr_exit1;
+ 		if ((new_size == 0) ||
+ 		    (((u64)iova_start + new_size) < (u64)iova_start)) {
+-			ehca_err(mr->device, "bad input values: new_size=%llx "
++			ehca_err(mr->device, "bad input values: new_size=%lx "
+ 				 "iova_start=%p", new_size, iova_start);
+ 			ret = -EINVAL;
+ 			goto rereg_phys_mr_exit1;
+@@ -615,8 +615,8 @@
+ 
+ 	h_ret = hipz_h_query_mr(shca->ipz_hca_handle, e_mr, &hipzout);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(mr->device, "hipz_mr_query failed, h_ret=%lli mr=%p "
+-			 "hca_hndl=%llx mr_hndl=%llx lkey=%x",
++		ehca_err(mr->device, "hipz_mr_query failed, h_ret=%li mr=%p "
++			 "hca_hndl=%lx mr_hndl=%lx lkey=%x",
+ 			 h_ret, mr, shca->ipz_hca_handle.handle,
+ 			 e_mr->ipz_mr_handle.handle, mr->lkey);
+ 		ret = ehca2ib_return_code(h_ret);
+@@ -665,8 +665,8 @@
+ 	/* TODO: BUSY: MR still has bound window(s) */
+ 	h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(mr->device, "hipz_free_mr failed, h_ret=%lli shca=%p "
+-			 "e_mr=%p hca_hndl=%llx mr_hndl=%llx mr->lkey=%x",
++		ehca_err(mr->device, "hipz_free_mr failed, h_ret=%li shca=%p "
++			 "e_mr=%p hca_hndl=%lx mr_hndl=%lx mr->lkey=%x",
+ 			 h_ret, shca, e_mr, shca->ipz_hca_handle.handle,
+ 			 e_mr->ipz_mr_handle.handle, mr->lkey);
+ 		ret = ehca2ib_return_code(h_ret);
+@@ -706,8 +706,8 @@
+ 	h_ret = hipz_h_alloc_resource_mw(shca->ipz_hca_handle, e_mw,
+ 					 e_pd->fw_pd, &hipzout);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(pd->device, "hipz_mw_allocate failed, h_ret=%lli "
+-			 "shca=%p hca_hndl=%llx mw=%p",
++		ehca_err(pd->device, "hipz_mw_allocate failed, h_ret=%li "
++			 "shca=%p hca_hndl=%lx mw=%p",
+ 			 h_ret, shca, shca->ipz_hca_handle.handle, e_mw);
+ 		ib_mw = ERR_PTR(ehca2ib_return_code(h_ret));
+ 		goto alloc_mw_exit1;
+@@ -748,8 +748,8 @@
+ 
+ 	h_ret = hipz_h_free_resource_mw(shca->ipz_hca_handle, e_mw);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(mw->device, "hipz_free_mw failed, h_ret=%lli shca=%p "
+-			 "mw=%p rkey=%x hca_hndl=%llx mw_hndl=%llx",
++		ehca_err(mw->device, "hipz_free_mw failed, h_ret=%li shca=%p "
++			 "mw=%p rkey=%x hca_hndl=%lx mw_hndl=%lx",
+ 			 h_ret, shca, mw, mw->rkey, shca->ipz_hca_handle.handle,
+ 			 e_mw->ipz_mw_handle.handle);
+ 		return ehca2ib_return_code(h_ret);
+@@ -875,7 +875,7 @@
+ 		goto map_phys_fmr_exit0;
+ 	if (iova % e_fmr->fmr_page_size) {
+ 		/* only whole-numbered pages */
+-		ehca_err(fmr->device, "bad iova, iova=%llx fmr_page_size=%x",
++		ehca_err(fmr->device, "bad iova, iova=%lx fmr_page_size=%x",
+ 			 iova, e_fmr->fmr_page_size);
+ 		ret = -EINVAL;
+ 		goto map_phys_fmr_exit0;
+@@ -913,7 +913,7 @@
+ map_phys_fmr_exit0:
+ 	if (ret)
+ 		ehca_err(fmr->device, "ret=%i fmr=%p page_list=%p list_len=%x "
+-			 "iova=%llx", ret, fmr, page_list, list_len, iova);
++			 "iova=%lx", ret, fmr, page_list, list_len, iova);
+ 	return ret;
+ } /* end ehca_map_phys_fmr() */
+ 
+@@ -999,8 +999,8 @@
+ 
+ 	h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_fmr);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(fmr->device, "hipz_free_mr failed, h_ret=%lli e_fmr=%p "
+-			 "hca_hndl=%llx fmr_hndl=%llx fmr->lkey=%x",
++		ehca_err(fmr->device, "hipz_free_mr failed, h_ret=%li e_fmr=%p "
++			 "hca_hndl=%lx fmr_hndl=%lx fmr->lkey=%x",
+ 			 h_ret, e_fmr, shca->ipz_hca_handle.handle,
+ 			 e_fmr->ipz_mr_handle.handle, fmr->lkey);
+ 		ret = ehca2ib_return_code(h_ret);
+@@ -1047,8 +1047,8 @@
+ 					 (u64)iova_start, size, hipz_acl,
+ 					 e_pd->fw_pd, &hipzout);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(&shca->ib_device, "hipz_alloc_mr failed, h_ret=%lli "
+-			 "hca_hndl=%llx", h_ret, shca->ipz_hca_handle.handle);
++		ehca_err(&shca->ib_device, "hipz_alloc_mr failed, h_ret=%li "
++			 "hca_hndl=%lx", h_ret, shca->ipz_hca_handle.handle);
+ 		ret = ehca2ib_return_code(h_ret);
+ 		goto ehca_reg_mr_exit0;
+ 	}
+@@ -1079,9 +1079,9 @@
+ ehca_reg_mr_exit1:
+ 	h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(&shca->ib_device, "h_ret=%lli shca=%p e_mr=%p "
+-			 "iova_start=%p size=%llx acl=%x e_pd=%p lkey=%x "
+-			 "pginfo=%p num_kpages=%llx num_hwpages=%llx ret=%i",
++		ehca_err(&shca->ib_device, "h_ret=%li shca=%p e_mr=%p "
++			 "iova_start=%p size=%lx acl=%x e_pd=%p lkey=%x "
++			 "pginfo=%p num_kpages=%lx num_hwpages=%lx ret=%i",
+ 			 h_ret, shca, e_mr, iova_start, size, acl, e_pd,
+ 			 hipzout.lkey, pginfo, pginfo->num_kpages,
+ 			 pginfo->num_hwpages, ret);
+@@ -1091,8 +1091,8 @@
+ ehca_reg_mr_exit0:
+ 	if (ret)
+ 		ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p "
+-			 "iova_start=%p size=%llx acl=%x e_pd=%p pginfo=%p "
+-			 "num_kpages=%llx num_hwpages=%llx",
++			 "iova_start=%p size=%lx acl=%x e_pd=%p pginfo=%p "
++			 "num_kpages=%lx num_hwpages=%lx",
+ 			 ret, shca, e_mr, iova_start, size, acl, e_pd, pginfo,
+ 			 pginfo->num_kpages, pginfo->num_hwpages);
+ 	return ret;
+@@ -1162,8 +1162,8 @@
+ 			 */
+ 			if (h_ret != H_SUCCESS) {
+ 				ehca_err(&shca->ib_device, "last "
+-					 "hipz_reg_rpage_mr failed, h_ret=%lli "
+-					 "e_mr=%p i=%x hca_hndl=%llx mr_hndl=%llx"
++					 "hipz_reg_rpage_mr failed, h_ret=%li "
++					 "e_mr=%p i=%x hca_hndl=%lx mr_hndl=%lx"
+ 					 " lkey=%x", h_ret, e_mr, i,
+ 					 shca->ipz_hca_handle.handle,
+ 					 e_mr->ipz_mr_handle.handle,
+@@ -1174,8 +1174,8 @@
+ 				ret = 0;
+ 		} else if (h_ret != H_PAGE_REGISTERED) {
+ 			ehca_err(&shca->ib_device, "hipz_reg_rpage_mr failed, "
+-				 "h_ret=%lli e_mr=%p i=%x lkey=%x hca_hndl=%llx "
+-				 "mr_hndl=%llx", h_ret, e_mr, i,
++				 "h_ret=%li e_mr=%p i=%x lkey=%x hca_hndl=%lx "
++				 "mr_hndl=%lx", h_ret, e_mr, i,
+ 				 e_mr->ib.ib_mr.lkey,
+ 				 shca->ipz_hca_handle.handle,
+ 				 e_mr->ipz_mr_handle.handle);
+@@ -1191,7 +1191,7 @@
+ ehca_reg_mr_rpages_exit0:
+ 	if (ret)
+ 		ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p pginfo=%p "
+-			 "num_kpages=%llx num_hwpages=%llx", ret, shca, e_mr,
++			 "num_kpages=%lx num_hwpages=%lx", ret, shca, e_mr,
+ 			 pginfo, pginfo->num_kpages, pginfo->num_hwpages);
+ 	return ret;
+ } /* end ehca_reg_mr_rpages() */
+@@ -1230,7 +1230,7 @@
+ 	ret = ehca_set_pagebuf(pginfo, pginfo->num_hwpages, kpage);
+ 	if (ret) {
+ 		ehca_err(&shca->ib_device, "set pagebuf failed, e_mr=%p "
+-			 "pginfo=%p type=%x num_kpages=%llx num_hwpages=%llx "
++			 "pginfo=%p type=%x num_kpages=%lx num_hwpages=%lx "
+ 			 "kpage=%p", e_mr, pginfo, pginfo->type,
+ 			 pginfo->num_kpages, pginfo->num_hwpages, kpage);
+ 		goto ehca_rereg_mr_rereg1_exit1;
+@@ -1251,13 +1251,13 @@
+ 		 * (MW bound or MR is shared)
+ 		 */
+ 		ehca_warn(&shca->ib_device, "hipz_h_reregister_pmr failed "
+-			  "(Rereg1), h_ret=%lli e_mr=%p", h_ret, e_mr);
++			  "(Rereg1), h_ret=%li e_mr=%p", h_ret, e_mr);
+ 		*pginfo = pginfo_save;
+ 		ret = -EAGAIN;
+ 	} else if ((u64 *)hipzout.vaddr != iova_start) {
+ 		ehca_err(&shca->ib_device, "PHYP changed iova_start in "
+-			 "rereg_pmr, iova_start=%p iova_start_out=%llx e_mr=%p "
+-			 "mr_handle=%llx lkey=%x lkey_out=%x", iova_start,
++			 "rereg_pmr, iova_start=%p iova_start_out=%lx e_mr=%p "
++			 "mr_handle=%lx lkey=%x lkey_out=%x", iova_start,
+ 			 hipzout.vaddr, e_mr, e_mr->ipz_mr_handle.handle,
+ 			 e_mr->ib.ib_mr.lkey, hipzout.lkey);
+ 		ret = -EFAULT;
+@@ -1281,7 +1281,7 @@
+ ehca_rereg_mr_rereg1_exit0:
+ 	if ( ret && (ret != -EAGAIN) )
+ 		ehca_err(&shca->ib_device, "ret=%i lkey=%x rkey=%x "
+-			 "pginfo=%p num_kpages=%llx num_hwpages=%llx",
++			 "pginfo=%p num_kpages=%lx num_hwpages=%lx",
+ 			 ret, *lkey, *rkey, pginfo, pginfo->num_kpages,
+ 			 pginfo->num_hwpages);
+ 	return ret;
+@@ -1309,7 +1309,7 @@
+ 	    (e_mr->num_hwpages > MAX_RPAGES) ||
+ 	    (pginfo->num_hwpages > e_mr->num_hwpages)) {
+ 		ehca_dbg(&shca->ib_device, "Rereg3 case, "
+-			 "pginfo->num_hwpages=%llx e_mr->num_hwpages=%x",
++			 "pginfo->num_hwpages=%lx e_mr->num_hwpages=%x",
+ 			 pginfo->num_hwpages, e_mr->num_hwpages);
+ 		rereg_1_hcall = 0;
+ 		rereg_3_hcall = 1;
+@@ -1341,7 +1341,7 @@
+ 		h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_mr);
+ 		if (h_ret != H_SUCCESS) {
+ 			ehca_err(&shca->ib_device, "hipz_free_mr failed, "
+-				 "h_ret=%lli e_mr=%p hca_hndl=%llx mr_hndl=%llx "
++				 "h_ret=%li e_mr=%p hca_hndl=%lx mr_hndl=%lx "
+ 				 "mr->lkey=%x",
+ 				 h_ret, e_mr, shca->ipz_hca_handle.handle,
+ 				 e_mr->ipz_mr_handle.handle,
+@@ -1374,8 +1374,8 @@
+ ehca_rereg_mr_exit0:
+ 	if (ret)
+ 		ehca_err(&shca->ib_device, "ret=%i shca=%p e_mr=%p "
+-			 "iova_start=%p size=%llx acl=%x e_pd=%p pginfo=%p "
+-			 "num_kpages=%llx lkey=%x rkey=%x rereg_1_hcall=%x "
++			 "iova_start=%p size=%lx acl=%x e_pd=%p pginfo=%p "
++			 "num_kpages=%lx lkey=%x rkey=%x rereg_1_hcall=%x "
+ 			 "rereg_3_hcall=%x", ret, shca, e_mr, iova_start, size,
+ 			 acl, e_pd, pginfo, pginfo->num_kpages, *lkey, *rkey,
+ 			 rereg_1_hcall, rereg_3_hcall);
+@@ -1417,8 +1417,8 @@
+ 		 * FMRs are not shared and no MW bound to FMRs
+ 		 */
+ 		ehca_err(&shca->ib_device, "hipz_reregister_pmr failed "
+-			 "(Rereg1), h_ret=%lli e_fmr=%p hca_hndl=%llx "
+-			 "mr_hndl=%llx lkey=%x lkey_out=%x",
++			 "(Rereg1), h_ret=%li e_fmr=%p hca_hndl=%lx "
++			 "mr_hndl=%lx lkey=%x lkey_out=%x",
+ 			 h_ret, e_fmr, shca->ipz_hca_handle.handle,
+ 			 e_fmr->ipz_mr_handle.handle,
+ 			 e_fmr->ib.ib_fmr.lkey, hipzout.lkey);
+@@ -1429,7 +1429,7 @@
+ 	h_ret = hipz_h_free_resource_mr(shca->ipz_hca_handle, e_fmr);
+ 	if (h_ret != H_SUCCESS) {
+ 		ehca_err(&shca->ib_device, "hipz_free_mr failed, "
+-			 "h_ret=%lli e_fmr=%p hca_hndl=%llx mr_hndl=%llx "
++			 "h_ret=%li e_fmr=%p hca_hndl=%lx mr_hndl=%lx "
+ 			 "lkey=%x",
+ 			 h_ret, e_fmr, shca->ipz_hca_handle.handle,
+ 			 e_fmr->ipz_mr_handle.handle,
+@@ -1493,9 +1493,9 @@
+ 				    (u64)iova_start, hipz_acl, e_pd->fw_pd,
+ 				    &hipzout);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(&shca->ib_device, "hipz_reg_smr failed, h_ret=%lli "
++		ehca_err(&shca->ib_device, "hipz_reg_smr failed, h_ret=%li "
+ 			 "shca=%p e_origmr=%p e_newmr=%p iova_start=%p acl=%x "
+-			 "e_pd=%p hca_hndl=%llx mr_hndl=%llx lkey=%x",
++			 "e_pd=%p hca_hndl=%lx mr_hndl=%lx lkey=%x",
+ 			 h_ret, shca, e_origmr, e_newmr, iova_start, acl, e_pd,
+ 			 shca->ipz_hca_handle.handle,
+ 			 e_origmr->ipz_mr_handle.handle,
+@@ -1662,7 +1662,7 @@
+ 			  &e_mr->ib.ib_mr.rkey, EHCA_REG_BUSMAP_MR);
+ 	if (ret) {
+ 		ehca_err(&shca->ib_device, "reg of internal max MR failed, "
+-			 "e_mr=%p iova_start=%p size_maxmr=%llx num_kpages=%x "
++			 "e_mr=%p iova_start=%p size_maxmr=%lx num_kpages=%x "
+ 			 "num_hwpages=%x", e_mr, iova_start, size_maxmr,
+ 			 num_kpages, num_hwpages);
+ 		goto ehca_reg_internal_maxmr_exit1;
+@@ -1708,8 +1708,8 @@
+ 				    (u64)iova_start, hipz_acl, e_pd->fw_pd,
+ 				    &hipzout);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(&shca->ib_device, "hipz_reg_smr failed, h_ret=%lli "
+-			 "e_origmr=%p hca_hndl=%llx mr_hndl=%llx lkey=%x",
++		ehca_err(&shca->ib_device, "hipz_reg_smr failed, h_ret=%li "
++			 "e_origmr=%p hca_hndl=%lx mr_hndl=%lx lkey=%x",
+ 			 h_ret, e_origmr, shca->ipz_hca_handle.handle,
+ 			 e_origmr->ipz_mr_handle.handle,
+ 			 e_origmr->ib.ib_mr.lkey);
+@@ -1786,28 +1786,28 @@
+ 	/* check first buffer */
+ 	if (((u64)iova_start & ~PAGE_MASK) != (pbuf->addr & ~PAGE_MASK)) {
+ 		ehca_gen_err("iova_start/addr mismatch, iova_start=%p "
+-			     "pbuf->addr=%llx pbuf->size=%llx",
++			     "pbuf->addr=%lx pbuf->size=%lx",
+ 			     iova_start, pbuf->addr, pbuf->size);
+ 		return -EINVAL;
+ 	}
+ 	if (((pbuf->addr + pbuf->size) % PAGE_SIZE) &&
+ 	    (num_phys_buf > 1)) {
+-		ehca_gen_err("addr/size mismatch in 1st buf, pbuf->addr=%llx "
+-			     "pbuf->size=%llx", pbuf->addr, pbuf->size);
++		ehca_gen_err("addr/size mismatch in 1st buf, pbuf->addr=%lx "
++			     "pbuf->size=%lx", pbuf->addr, pbuf->size);
+ 		return -EINVAL;
+ 	}
+ 
+ 	for (i = 0; i < num_phys_buf; i++) {
+ 		if ((i > 0) && (pbuf->addr % PAGE_SIZE)) {
+-			ehca_gen_err("bad address, i=%x pbuf->addr=%llx "
+-				     "pbuf->size=%llx",
++			ehca_gen_err("bad address, i=%x pbuf->addr=%lx "
++				     "pbuf->size=%lx",
+ 				     i, pbuf->addr, pbuf->size);
+ 			return -EINVAL;
+ 		}
+ 		if (((i > 0) &&	/* not 1st */
+ 		     (i < (num_phys_buf - 1)) &&	/* not last */
+ 		     (pbuf->size % PAGE_SIZE)) || (pbuf->size == 0)) {
+-			ehca_gen_err("bad size, i=%x pbuf->size=%llx",
++			ehca_gen_err("bad size, i=%x pbuf->size=%lx",
+ 				     i, pbuf->size);
+ 			return -EINVAL;
+ 		}
+@@ -1840,7 +1840,7 @@
+ 	page = page_list;
+ 	for (i = 0; i < list_len; i++) {
+ 		if (*page % e_fmr->fmr_page_size) {
+-			ehca_gen_err("bad page, i=%x *page=%llx page=%p fmr=%p "
++			ehca_gen_err("bad page, i=%x *page=%lx page=%p fmr=%p "
+ 				     "fmr_page_size=%x", i, *page, page, e_fmr,
+ 				     e_fmr->fmr_page_size);
+ 			return -EINVAL;
+@@ -1878,9 +1878,9 @@
+ 					     (pginfo->next_hwpage *
+ 					      pginfo->hwpage_size));
+ 			if ( !(*kpage) ) {
+-				ehca_gen_err("pgaddr=%llx "
+-					     "chunk->page_list[i]=%llx "
+-					     "i=%x next_hwpage=%llx",
++				ehca_gen_err("pgaddr=%lx "
++					     "chunk->page_list[i]=%lx "
++					     "i=%x next_hwpage=%lx",
+ 					     pgaddr, (u64)sg_dma_address(
+ 						     &chunk->page_list[i]),
+ 					     i, pginfo->next_hwpage);
+@@ -1930,11 +1930,11 @@
+ 	for (t = start_idx; t <= end_idx; t++) {
+ 		u64 pgaddr = page_to_pfn(sg_page(&page_list[t])) << PAGE_SHIFT;
+ 		if (ehca_debug_level >= 3)
+-			ehca_gen_dbg("chunk_page=%llx value=%016llx", pgaddr,
++			ehca_gen_dbg("chunk_page=%lx value=%016lx", pgaddr,
+ 				     *(u64 *)abs_to_virt(phys_to_abs(pgaddr)));
+ 		if (pgaddr - PAGE_SIZE != *prev_pgaddr) {
+-			ehca_gen_err("uncontiguous page found pgaddr=%llx "
+-				     "prev_pgaddr=%llx page_list_i=%x",
++			ehca_gen_err("uncontiguous page found pgaddr=%lx "
++				     "prev_pgaddr=%lx page_list_i=%x",
+ 				     pgaddr, *prev_pgaddr, t);
+ 			return -EINVAL;
+ 		}
+@@ -1968,7 +1968,7 @@
+ 					   << PAGE_SHIFT );
+ 				*kpage = phys_to_abs(pgaddr);
+ 				if ( !(*kpage) ) {
+-					ehca_gen_err("pgaddr=%llx i=%x",
++					ehca_gen_err("pgaddr=%lx i=%x",
+ 						     pgaddr, i);
+ 					ret = -EFAULT;
+ 					return ret;
+@@ -1981,8 +1981,8 @@
+ 					if (pginfo->hwpage_cnt) {
+ 						ehca_gen_err(
+ 							"invalid alignment "
+-							"pgaddr=%llx i=%x "
+-							"mr_pgsize=%llx",
++							"pgaddr=%lx i=%x "
++							"mr_pgsize=%lx",
+ 							pgaddr, i,
+ 							pginfo->hwpage_size);
+ 						ret = -EFAULT;
+@@ -2001,8 +2001,8 @@
+ 				if (ehca_debug_level >= 3) {
+ 					u64 val = *(u64 *)abs_to_virt(
+ 						phys_to_abs(pgaddr));
+-					ehca_gen_dbg("kpage=%llx chunk_page=%llx "
+-						     "value=%016llx",
++					ehca_gen_dbg("kpage=%lx chunk_page=%lx "
++						     "value=%016lx",
+ 						     *kpage, pgaddr, val);
+ 				}
+ 				prev_pgaddr = pgaddr;
+@@ -2079,9 +2079,9 @@
+ 			if ((pginfo->kpage_cnt >= pginfo->num_kpages) ||
+ 			    (pginfo->hwpage_cnt >= pginfo->num_hwpages)) {
+ 				ehca_gen_err("kpage_cnt >= num_kpages, "
+-					     "kpage_cnt=%llx num_kpages=%llx "
+-					     "hwpage_cnt=%llx "
+-					     "num_hwpages=%llx i=%x",
++					     "kpage_cnt=%lx num_kpages=%lx "
++					     "hwpage_cnt=%lx "
++					     "num_hwpages=%lx i=%x",
+ 					     pginfo->kpage_cnt,
+ 					     pginfo->num_kpages,
+ 					     pginfo->hwpage_cnt,
+@@ -2092,8 +2092,8 @@
+ 				(pbuf->addr & ~(pginfo->hwpage_size - 1)) +
+ 				(pginfo->next_hwpage * pginfo->hwpage_size));
+ 			if ( !(*kpage) && pbuf->addr ) {
+-				ehca_gen_err("pbuf->addr=%llx pbuf->size=%llx "
+-					     "next_hwpage=%llx", pbuf->addr,
++				ehca_gen_err("pbuf->addr=%lx pbuf->size=%lx "
++					     "next_hwpage=%lx", pbuf->addr,
+ 					     pbuf->size, pginfo->next_hwpage);
+ 				return -EFAULT;
+ 			}
+@@ -2131,8 +2131,8 @@
+ 		*kpage = phys_to_abs((*fmrlist & ~(pginfo->hwpage_size - 1)) +
+ 				     pginfo->next_hwpage * pginfo->hwpage_size);
+ 		if ( !(*kpage) ) {
+-			ehca_gen_err("*fmrlist=%llx fmrlist=%p "
+-				     "next_listelem=%llx next_hwpage=%llx",
++			ehca_gen_err("*fmrlist=%lx fmrlist=%p "
++				     "next_listelem=%lx next_hwpage=%lx",
+ 				     *fmrlist, fmrlist,
+ 				     pginfo->u.fmr.next_listelem,
+ 				     pginfo->next_hwpage);
+@@ -2160,7 +2160,7 @@
+ 						    ~(pginfo->hwpage_size - 1));
+ 				if (prev + pginfo->u.fmr.fmr_pgsize != p) {
+ 					ehca_gen_err("uncontiguous fmr pages "
+-						     "found prev=%llx p=%llx "
++						     "found prev=%lx p=%lx "
+ 						     "idx=%x", prev, p, i + j);
+ 					return -EINVAL;
+ 				}
+@@ -2494,8 +2494,8 @@
+ 		return 0; /* Everything is fine */
+ 	else {
+ 		ehca_err(&shca->ib_device, "ehca_reg_bmap_mr_rpages failed, "
+-				 "h_ret=%lli e_mr=%p top=%x lkey=%x "
+-				 "hca_hndl=%llx mr_hndl=%llx", hret, e_mr, top,
++				 "h_ret=%li e_mr=%p top=%x lkey=%x "
++				 "hca_hndl=%lx mr_hndl=%lx", hret, e_mr, top,
+ 				 e_mr->ib.ib_mr.lkey,
+ 				 shca->ipz_hca_handle.handle,
+ 				 e_mr->ipz_mr_handle.handle);
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_qp.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_qp.c	2009-07-27 08:37:13.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_qp.c	2009-07-27 08:59:04.000000000 -0400
+@@ -331,7 +331,7 @@
+ 		if (cnt == (nr_q_pages - 1)) {	/* last page! */
+ 			if (h_ret != expected_hret) {
+ 				ehca_err(ib_dev, "hipz_qp_register_rpage() "
+-					 "h_ret=%lli", h_ret);
++					 "h_ret=%li", h_ret);
+ 				ret = ehca2ib_return_code(h_ret);
+ 				goto init_qp_queue1;
+ 			}
+@@ -345,7 +345,7 @@
+ 		} else {
+ 			if (h_ret != H_PAGE_REGISTERED) {
+ 				ehca_err(ib_dev, "hipz_qp_register_rpage() "
+-					 "h_ret=%lli", h_ret);
++					 "h_ret=%li", h_ret);
+ 				ret = ehca2ib_return_code(h_ret);
+ 				goto init_qp_queue1;
+ 			}
+@@ -711,7 +711,7 @@
+ 
+ 	h_ret = hipz_h_alloc_resource_qp(shca->ipz_hca_handle, &parms, is_user);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(pd->device, "h_alloc_resource_qp() failed h_ret=%lli",
++		ehca_err(pd->device, "h_alloc_resource_qp() failed h_ret=%li",
+ 			 h_ret);
+ 		ret = ehca2ib_return_code(h_ret);
+ 		goto create_qp_exit1;
+@@ -1015,7 +1015,7 @@
+ 				mqpcb, my_qp->galpas.kernel);
+ 	if (hret != H_SUCCESS) {
+ 		ehca_err(pd->device, "Could not modify SRQ to INIT "
+-			 "ehca_qp=%p qp_num=%x h_ret=%lli",
++			 "ehca_qp=%p qp_num=%x h_ret=%li",
+ 			 my_qp, my_qp->real_qp_num, hret);
+ 		goto create_srq2;
+ 	}
+@@ -1029,7 +1029,7 @@
+ 				mqpcb, my_qp->galpas.kernel);
+ 	if (hret != H_SUCCESS) {
+ 		ehca_err(pd->device, "Could not enable SRQ "
+-			 "ehca_qp=%p qp_num=%x h_ret=%lli",
++			 "ehca_qp=%p qp_num=%x h_ret=%li",
+ 			 my_qp, my_qp->real_qp_num, hret);
+ 		goto create_srq2;
+ 	}
+@@ -1043,7 +1043,7 @@
+ 				mqpcb, my_qp->galpas.kernel);
+ 	if (hret != H_SUCCESS) {
+ 		ehca_err(pd->device, "Could not modify SRQ to RTR "
+-			 "ehca_qp=%p qp_num=%x h_ret=%lli",
++			 "ehca_qp=%p qp_num=%x h_ret=%li",
+ 			 my_qp, my_qp->real_qp_num, hret);
+ 		goto create_srq2;
+ 	}
+@@ -1083,7 +1083,7 @@
+ 					   &bad_send_wqe_p, NULL, 2);
+ 	if (h_ret != H_SUCCESS) {
+ 		ehca_err(&shca->ib_device, "hipz_h_disable_and_get_wqe() failed"
+-			 " ehca_qp=%p qp_num=%x h_ret=%lli",
++			 " ehca_qp=%p qp_num=%x h_ret=%li",
+ 			 my_qp, qp_num, h_ret);
+ 		return ehca2ib_return_code(h_ret);
+ 	}
+@@ -1139,7 +1139,7 @@
+ 
+ 	if (ipz_queue_abs_to_offset(ipz_queue, wqe_p, &q_ofs)) {
+ 		ehca_gen_err("Invalid offset for calculating left cqes "
+-				"wqe_p=%#llx wqe_v=%p\n", wqe_p, wqe_v);
++				"wqe_p=%#lx wqe_v=%p\n", wqe_p, wqe_v);
+ 		return -EFAULT;
+ 	}
+ 
+@@ -1173,7 +1173,7 @@
+ 				&send_wqe_p, &recv_wqe_p, 4);
+ 		if (h_ret != H_SUCCESS) {
+ 			ehca_err(&shca->ib_device, "disable_and_get_wqe() "
+-				 "failed ehca_qp=%p qp_num=%x h_ret=%lli",
++				 "failed ehca_qp=%p qp_num=%x h_ret=%li",
+ 				 my_qp, qp_num, h_ret);
+ 			return ehca2ib_return_code(h_ret);
+ 		}
+@@ -1267,7 +1267,7 @@
+ 				mqpcb, my_qp->galpas.kernel);
+ 	if (h_ret != H_SUCCESS) {
+ 		ehca_err(ibqp->device, "hipz_h_query_qp() failed "
+-			 "ehca_qp=%p qp_num=%x h_ret=%lli",
++			 "ehca_qp=%p qp_num=%x h_ret=%li",
+ 			 my_qp, ibqp->qp_num, h_ret);
+ 		ret = ehca2ib_return_code(h_ret);
+ 		goto modify_qp_exit1;
+@@ -1698,7 +1698,7 @@
+ 
+ 	if (h_ret != H_SUCCESS) {
+ 		ret = ehca2ib_return_code(h_ret);
+-		ehca_err(ibqp->device, "hipz_h_modify_qp() failed h_ret=%lli "
++		ehca_err(ibqp->device, "hipz_h_modify_qp() failed h_ret=%li "
+ 			 "ehca_qp=%p qp_num=%x", h_ret, my_qp, ibqp->qp_num);
+ 		goto modify_qp_exit2;
+ 	}
+@@ -1731,7 +1731,7 @@
+ 			ret = ehca2ib_return_code(h_ret);
+ 			ehca_err(ibqp->device, "ENABLE in context of "
+ 				 "RESET_2_INIT failed! Maybe you didn't get "
+-				 "a LID h_ret=%lli ehca_qp=%p qp_num=%x",
++				 "a LID h_ret=%li ehca_qp=%p qp_num=%x",
+ 				 h_ret, my_qp, ibqp->qp_num);
+ 			goto modify_qp_exit2;
+ 		}
+@@ -1919,7 +1919,7 @@
+ 	if (h_ret != H_SUCCESS) {
+ 		ret = ehca2ib_return_code(h_ret);
+ 		ehca_err(qp->device, "hipz_h_query_qp() failed "
+-			 "ehca_qp=%p qp_num=%x h_ret=%lli",
++			 "ehca_qp=%p qp_num=%x h_ret=%li",
+ 			 my_qp, qp->qp_num, h_ret);
+ 		goto query_qp_exit1;
+ 	}
+@@ -2077,7 +2077,7 @@
+ 
+ 	if (h_ret != H_SUCCESS) {
+ 		ret = ehca2ib_return_code(h_ret);
+-		ehca_err(ibsrq->device, "hipz_h_modify_qp() failed h_ret=%lli "
++		ehca_err(ibsrq->device, "hipz_h_modify_qp() failed h_ret=%li "
+ 			 "ehca_qp=%p qp_num=%x",
+ 			 h_ret, my_qp, my_qp->real_qp_num);
+ 	}
+@@ -2111,7 +2111,7 @@
+ 	if (h_ret != H_SUCCESS) {
+ 		ret = ehca2ib_return_code(h_ret);
+ 		ehca_err(srq->device, "hipz_h_query_qp() failed "
+-			 "ehca_qp=%p qp_num=%x h_ret=%lli",
++			 "ehca_qp=%p qp_num=%x h_ret=%li",
+ 			 my_qp, my_qp->real_qp_num, h_ret);
+ 		goto query_srq_exit1;
+ 	}
+@@ -2183,7 +2183,7 @@
+ 
+ 	h_ret = hipz_h_destroy_qp(shca->ipz_hca_handle, my_qp);
+ 	if (h_ret != H_SUCCESS) {
+-		ehca_err(dev, "hipz_h_destroy_qp() failed h_ret=%lli "
++		ehca_err(dev, "hipz_h_destroy_qp() failed h_ret=%li "
+ 			 "ehca_qp=%p qp_num=%x", h_ret, my_qp, qp_num);
+ 		return ehca2ib_return_code(h_ret);
+ 	}
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_reqs.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_reqs.c	2009-07-26 09:08:48.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_reqs.c	2009-07-27 08:59:04.000000000 -0400
+@@ -822,7 +822,7 @@
+ 		offset = qmap->next_wqe_idx * ipz_queue->qe_size;
+ 		wqe = (struct ehca_wqe *)ipz_qeit_calc(ipz_queue, offset);
+ 		if (!wqe) {
+-			ehca_err(cq->device, "Invalid wqe offset=%#llx on "
++			ehca_err(cq->device, "Invalid wqe offset=%#lx on "
+ 				 "qp_num=%#x", offset, my_qp->real_qp_num);
+ 			return nr;
+ 		}
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_sqp.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_sqp.c	2009-07-26 09:08:48.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_sqp.c	2009-07-27 08:59:04.000000000 -0400
+@@ -85,7 +85,7 @@
+ 
+ 		if (ret != H_SUCCESS) {
+ 			ehca_err(&shca->ib_device,
+-				 "Can't define AQP1 for port %x. h_ret=%lli",
++				 "Can't define AQP1 for port %x. h_ret=%li",
+ 				 port, ret);
+ 			return ret;
+ 		}
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_tools.h
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_tools.h	2009-07-26 09:08:48.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_tools.h	2009-07-27 08:59:04.000000000 -0400
+@@ -116,7 +116,7 @@
+ 		unsigned char *deb = (unsigned char *)(adr); \
+ 		for (x = 0; x < l; x += 16) { \
+ 			printk(KERN_INFO "EHCA_DMP:%s " format \
+-			       " adr=%p ofs=%04x %016llx %016llx\n", \
++			       " adr=%p ofs=%04x %016lx %016lx\n", \
+ 			       __func__, ##args, deb, x, \
+ 			       *((u64 *)&deb[0]), *((u64 *)&deb[8])); \
+ 			deb += 16; \
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_uverbs.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_uverbs.c	2009-07-26 09:08:48.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_uverbs.c	2009-07-27 08:59:04.000000000 -0400
+@@ -114,7 +114,7 @@
+ 
+ 	physical = galpas->user.fw_handle;
+ 	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+-	ehca_gen_dbg("vsize=%llx physical=%llx", vsize, physical);
++	ehca_gen_dbg("vsize=%lx physical=%lx", vsize, physical);
+ 	/* VM_IO | VM_RESERVED are set by remap_pfn_range() */
+ 	ret = remap_4k_pfn(vma, vma->vm_start, physical >> EHCA_PAGESHIFT,
+ 			   vma->vm_page_prot);
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/hcp_if.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/hcp_if.c	2009-07-27 08:37:13.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/hcp_if.c	2009-07-27 08:59:04.000000000 -0400
+@@ -249,7 +249,7 @@
+ 	*eq_ist = (u32)outs[5];
+ 
+ 	if (ret == H_NOT_ENOUGH_RESOURCES)
+-		ehca_gen_err("Not enough resource - ret=%lli ", ret);
++		ehca_gen_err("Not enough resource - ret=%li ", ret);
+ 
+ 	return ret;
+ }
+@@ -287,7 +287,7 @@
+ 		hcp_galpas_ctor(&cq->galpas, 0, outs[5], outs[6]);
+ 
+ 	if (ret == H_NOT_ENOUGH_RESOURCES)
+-		ehca_gen_err("Not enough resources. ret=%lli", ret);
++		ehca_gen_err("Not enough resources. ret=%li", ret);
+ 
+ 	return ret;
+ }
+@@ -362,7 +362,7 @@
+ 		hcp_galpas_ctor(&parms->galpas, is_user, outs[6], outs[6]);
+ 
+ 	if (ret == H_NOT_ENOUGH_RESOURCES)
+-		ehca_gen_err("Not enough resources. ret=%lli", ret);
++		ehca_gen_err("Not enough resources. ret=%li", ret);
+ 
+ 	return ret;
+ }
+@@ -454,7 +454,7 @@
+ 			     const u64 count)
+ {
+ 	if (count != 1) {
+-		ehca_gen_err("Ppage counter=%llx", count);
++		ehca_gen_err("Ppage counter=%lx", count);
+ 		return H_PARAMETER;
+ 	}
+ 	return hipz_h_register_rpage(adapter_handle,
+@@ -489,7 +489,7 @@
+ 			     const struct h_galpa gal)
+ {
+ 	if (count != 1) {
+-		ehca_gen_err("Page counter=%llx", count);
++		ehca_gen_err("Page counter=%lx", count);
+ 		return H_PARAMETER;
+ 	}
+ 
+@@ -508,7 +508,7 @@
+ 			     const struct h_galpa galpa)
+ {
+ 	if (count > 1) {
+-		ehca_gen_err("Page counter=%llx", count);
++		ehca_gen_err("Page counter=%lx", count);
+ 		return H_PARAMETER;
+ 	}
+ 
+@@ -557,7 +557,7 @@
+ 				0, 0, 0, 0, 0);
+ 
+ 	if (ret == H_NOT_ENOUGH_RESOURCES)
+-		ehca_gen_err("Insufficient resources ret=%lli", ret);
++		ehca_gen_err("Insufficient resources ret=%li", ret);
+ 
+ 	return ret;
+ }
+@@ -593,7 +593,7 @@
+ 				qp->ipz_qp_handle.handle,  /* r6 */
+ 				0, 0, 0, 0, 0, 0);
+ 	if (ret == H_HARDWARE)
+-		ehca_gen_err("HCA not operational. ret=%lli", ret);
++		ehca_gen_err("HCA not operational. ret=%li", ret);
+ 
+ 	ret = ehca_plpar_hcall_norets(H_FREE_RESOURCE,
+ 				      adapter_handle.handle,     /* r4 */
+@@ -601,7 +601,7 @@
+ 				      0, 0, 0, 0, 0);
+ 
+ 	if (ret == H_RESOURCE)
+-		ehca_gen_err("Resource still in use. ret=%lli", ret);
++		ehca_gen_err("Resource still in use. ret=%li", ret);
+ 
+ 	return ret;
+ }
+@@ -636,7 +636,7 @@
+ 	*bma_qp_nr = (u32)outs[1];
+ 
+ 	if (ret == H_ALIAS_EXIST)
+-		ehca_gen_err("AQP1 already exists. ret=%lli", ret);
++		ehca_gen_err("AQP1 already exists. ret=%li", ret);
+ 
+ 	return ret;
+ }
+@@ -658,7 +658,7 @@
+ 				      0, 0);
+ 
+ 	if (ret == H_NOT_ENOUGH_RESOURCES)
+-		ehca_gen_err("Not enough resources. ret=%lli", ret);
++		ehca_gen_err("Not enough resources. ret=%li", ret);
+ 
+ 	return ret;
+ }
+@@ -697,7 +697,7 @@
+ 				      0, 0, 0, 0);
+ 
+ 	if (ret == H_RESOURCE)
+-		ehca_gen_err("H_FREE_RESOURCE failed ret=%lli ", ret);
++		ehca_gen_err("H_FREE_RESOURCE failed ret=%li ", ret);
+ 
+ 	return ret;
+ }
+@@ -719,7 +719,7 @@
+ 				      0, 0, 0, 0, 0);
+ 
+ 	if (ret == H_RESOURCE)
+-		ehca_gen_err("Resource in use. ret=%lli ", ret);
++		ehca_gen_err("Resource in use. ret=%li ", ret);
+ 
+ 	return ret;
+ }
+@@ -774,9 +774,9 @@
+ 
+ 	if ((count > 1) && (logical_address_of_page & (EHCA_PAGESIZE-1))) {
+ 		ehca_gen_err("logical_address_of_page not on a 4k boundary "
+-			     "adapter_handle=%llx mr=%p mr_handle=%llx "
++			     "adapter_handle=%lx mr=%p mr_handle=%lx "
+ 			     "pagesize=%x queue_type=%x "
+-			     "logical_address_of_page=%llx count=%llx",
++			     "logical_address_of_page=%lx count=%lx",
+ 			     adapter_handle.handle, mr,
+ 			     mr->ipz_mr_handle.handle, pagesize, queue_type,
+ 			     logical_address_of_page, count);
Index: ofa_kernel-1.5.patch2/kernel_patches/backport/2.6.27_sles11/ehca-010-undo_cpumask.patch
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ofa_kernel-1.5.patch2/kernel_patches/backport/2.6.27_sles11/ehca-010-undo_cpumask.patch	2009-07-27 08:37:02.000000000 -0400
@@ -0,0 +1,42 @@
+---
+ drivers/infiniband/hw/ehca/ehca_irq.c |   14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+Index: ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_irq.c
+===================================================================
+--- ofa_kernel-1.5.orig/drivers/infiniband/hw/ehca/ehca_irq.c	2009-07-27 08:20:08.000000000 -0400
++++ ofa_kernel-1.5/drivers/infiniband/hw/ehca/ehca_irq.c	2009-07-27 08:26:31.000000000 -0400
+@@ -659,12 +659,12 @@
+ 
+ 	WARN_ON_ONCE(!in_interrupt());
+ 	if (ehca_debug_level >= 3)
+-		ehca_dmp(cpu_online_mask, cpumask_size(), "");
++		ehca_dmp(&cpu_online_map, sizeof(cpumask_t), "");
+ 
+ 	spin_lock_irqsave(&pool->last_cpu_lock, flags);
+-	cpu = cpumask_next(pool->last_cpu, cpu_online_mask);
++	cpu = next_cpu_nr(pool->last_cpu, cpu_online_map);
+ 	if (cpu >= nr_cpu_ids)
+-		cpu = cpumask_first(cpu_online_mask);
++		cpu = first_cpu(cpu_online_map);
+ 	pool->last_cpu = cpu;
+ 	spin_unlock_irqrestore(&pool->last_cpu_lock, flags);
+ 
+@@ -855,7 +855,7 @@
+ 	case CPU_UP_CANCELED_FROZEN:
+ 		ehca_gen_dbg("CPU: %x (CPU_CANCELED)", cpu);
+ 		cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu);
+-		kthread_bind(cct->task, cpumask_any(cpu_online_mask));
++		kthread_bind(cct->task, any_online_cpu(cpu_online_map));
+ 		destroy_comp_task(pool, cpu);
+ 		break;
+ 	case CPU_ONLINE:
+@@ -902,7 +902,7 @@
+ 		return -ENOMEM;
+ 
+ 	spin_lock_init(&pool->last_cpu_lock);
+-	pool->last_cpu = cpumask_any(cpu_online_mask);
++	pool->last_cpu = any_online_cpu(cpu_online_map);
+ 
+ 	pool->cpu_comp_tasks = alloc_percpu(struct ehca_cpu_comp_task);
+ 	if (pool->cpu_comp_tasks == NULL) {



More information about the ewg mailing list