[Openib-windows] [PATCH] MTHCA: Fix memory registration for x86
Fab Tillier
ftillier at silverstorm.com
Tue Sep 5 13:28:46 PDT 2006
Hi Leo,
Here's a patch that fixes memory registration on 32-bit platforms. Virtual
addresses in Windows are sign extended when extended to 64-bits, but the
code currently truncates the input virtual address to 32-bits and then does
an unsigned extension to 64-bits.
This patch fixes SRP protection errors on the receive queue when running on
32-bit platforms.
- Fab
Index: base/hw/mthca/kernel/hca_memory.c
===================================================================
--- base/hw/mthca/kernel/hca_memory.c (revision 469)
+++ base/hw/mthca/kernel/hca_memory.c (working copy)
@@ -88,7 +88,7 @@
// register mr
mr_p = ibv_reg_mr(ib_pd_p,
map_qp_ibal_acl(p_mr_create->access_ctrl),
p_mr_create->vaddr, p_mr_create->length,
- (uint64_t)(ULONG_PTR)(void*)p_mr_create->vaddr, um_call );
+ (uint64_t)p_mr_create->vaddr, um_call );
if (IS_ERR(mr_p)) {
err = PTR_ERR(mr_p);
HCA_PRINT(TRACE_LEVEL_ERROR, HCA_DBG_MEMORY,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mthca_mr_pointer_truncation.patch
Type: application/octet-stream
Size: 569 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20060905/753cb2c8/attachment.obj>
More information about the ofw
mailing list