| 187 | } |
| 188 | |
| 189 | static int |
| 190 | device_map_resource_offset(struct rte_platform_device *pdev, struct rte_platform_resource *res, |
| 191 | size_t offset) |
| 192 | { |
| 193 | res->mem.addr = mmap(NULL, res->mem.len, PROT_READ | PROT_WRITE, MAP_SHARED, pdev->dev_fd, |
| 194 | offset); |
| 195 | if (res->mem.addr == MAP_FAILED) |
| 196 | return -errno; |
| 197 | |
| 198 | PLATFORM_LOG(DEBUG, "adding resource va = %p len = %"PRIu64" name = %s\n", res->mem.addr, |
| 199 | res->mem.len, res->name); |
| 200 | |
| 201 | return 0; |
| 202 | } |
| 203 | |
| 204 | static void |
| 205 | device_unmap_resources(struct rte_platform_device *pdev) |
no outgoing calls
no test coverage detected