git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common/sfc_efx/base: update MCDI headers
[dpdk.git]
/
drivers
/
common
/
octeontx2
/
otx2_dev.c
diff --git
a/drivers/common/octeontx2/otx2_dev.c
b/drivers/common/octeontx2/otx2_dev.c
index
d61c712
..
6a84df2
100644
(file)
--- a/
drivers/common/octeontx2/otx2_dev.c
+++ b/
drivers/common/octeontx2/otx2_dev.c
@@
-11,6
+11,7
@@
#include <rte_common.h>
#include <rte_eal.h>
#include <rte_memcpy.h>
#include <rte_common.h>
#include <rte_eal.h>
#include <rte_memcpy.h>
+#include <rte_eal_paging.h>
#include "otx2_dev.h"
#include "otx2_mbox.h"
#include "otx2_dev.h"
#include "otx2_mbox.h"
@@
-34,10
+35,11
@@
mbox_mem_map(off_t off, size_t size)
if (mem_fd < 0)
goto error;
if (mem_fd < 0)
goto error;
- va = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, mem_fd, off);
+ va = rte_mem_map(NULL, size, RTE_PROT_READ | RTE_PROT_WRITE,
+ RTE_MAP_SHARED, mem_fd, off);
close(mem_fd);
close(mem_fd);
- if (va ==
MAP_FAILED
)
+ if (va ==
NULL
)
otx2_err("Failed to mmap sz=0x%zx, fd=%d, off=%jd",
size, mem_fd, (intmax_t)off);
error:
otx2_err("Failed to mmap sz=0x%zx, fd=%d, off=%jd",
size, mem_fd, (intmax_t)off);
error:
@@
-48,7
+50,7
@@
static void
mbox_mem_unmap(void *va, size_t size)
{
if (va)
mbox_mem_unmap(void *va, size_t size)
{
if (va)
-
m
unmap(va, size);
+
rte_mem_
unmap(va, size);
}
static int
}
static int