Commit ee5f750f authored by Dave Jiang's avatar Dave Jiang Committed by Jon Mason

ntb: add missing setup of translation window

The perf tool is missing the setup of translation window. Adding call to
setup the translation window for backed memory.
Signed-off-by: default avatarJohn Kading <john.kading@gd-ms.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 84f76685
...@@ -425,6 +425,7 @@ static int perf_set_mw(struct perf_ctx *perf, resource_size_t size) ...@@ -425,6 +425,7 @@ static int perf_set_mw(struct perf_ctx *perf, resource_size_t size)
{ {
struct perf_mw *mw = &perf->mw; struct perf_mw *mw = &perf->mw;
size_t xlat_size, buf_size; size_t xlat_size, buf_size;
int rc;
if (!size) if (!size)
return -EINVAL; return -EINVAL;
...@@ -448,6 +449,13 @@ static int perf_set_mw(struct perf_ctx *perf, resource_size_t size) ...@@ -448,6 +449,13 @@ static int perf_set_mw(struct perf_ctx *perf, resource_size_t size)
mw->buf_size = 0; mw->buf_size = 0;
} }
rc = ntb_mw_set_trans(perf->ntb, 0, mw->dma_addr, mw->xlat_size);
if (rc) {
dev_err(&perf->ntb->dev, "Unable to set mw0 translation\n");
perf_free_mw(perf);
return -EIO;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment