1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17#ifndef RDMA_UTILS_H
18#define RDMA_UTILS_H
19
20#include "qemu/osdep.h"
21#include "hw/pci/pci.h"
22#include "sysemu/dma.h"
23
24#define pr_info(fmt, ...) \
25 fprintf(stdout, "%s: %-20s (%3d): " fmt, "pvrdma", __func__, __LINE__,\
26 ## __VA_ARGS__)
27
28#define pr_err(fmt, ...) \
29 fprintf(stderr, "%s: Error at %-20s (%3d): " fmt, "pvrdma", __func__, \
30 __LINE__, ## __VA_ARGS__)
31
32#ifdef PVRDMA_DEBUG
33#define pr_dbg(fmt, ...) \
34 fprintf(stdout, "%s: %-20s (%3d): " fmt, "pvrdma", __func__, __LINE__,\
35 ## __VA_ARGS__)
36#else
37#define pr_dbg(fmt, ...)
38#endif
39
40void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t plen);
41void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len);
42
43#endif
44