From 21053cdfd3aeadfa38e3025e7751119838379b44 Mon Sep 17 00:00:00 2001 From: liangzhen Date: Tue, 31 Mar 2009 05:20:46 +0000 Subject: [PATCH] Branch HEAD b=18487 i=liang Pass in physical address, MX needs to translate the address into physical address anyway and mxlnd knows more about how to translate them. --- lnet/klnds/mxlnd/mxlnd_cb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnet/klnds/mxlnd/mxlnd_cb.c b/lnet/klnds/mxlnd/mxlnd_cb.c index 2b8b32a..8491194 100644 --- a/lnet/klnds/mxlnd/mxlnd_cb.c +++ b/lnet/klnds/mxlnd/mxlnd_cb.c @@ -1485,7 +1485,7 @@ mxlnd_setup_iov(struct kmx_ctx *ctx, u32 niov, struct iovec *iov, u32 offset, u3 ctx->mxc_nseg = nseg; sum = 0; for (i = 0; i < nseg; i++) { - seg[i].segment_ptr = MX_KVA_TO_U64(iov[first_iov + i].iov_base); + seg[i].segment_ptr = MX_PA_TO_U64(virt_to_phys(iov[first_iov + i].iov_base)); seg[i].segment_length = (u32) iov[first_iov + i].iov_len; if (i == 0) { seg[i].segment_ptr += (u64) first_iov_offset; @@ -1497,7 +1497,7 @@ mxlnd_setup_iov(struct kmx_ctx *ctx, u32 niov, struct iovec *iov, u32 offset, u3 sum += seg[i].segment_length; } ctx->mxc_seg_list = seg; - ctx->mxc_pin_type = MX_PIN_KERNEL; + ctx->mxc_pin_type = MX_PIN_PHYSICAL; #ifdef MX_PIN_FULLPAGES ctx->mxc_pin_type |= MX_PIN_FULLPAGES; #endif -- 1.8.3.1