struct ifpga_hw *hw = malloc(sizeof(*hw));
if (hw) {
- memset(hw, 0, sizeof(*hw));
+ opae_memset(hw, 0, sizeof(*hw));
hw->pci_data = adapter->data;
hw->adapter = adapter;
if (ifpga_bus_enumerate(hw))
guidh = readq(&port_hdr->afu_header.guid.b[8]);
spinlock_unlock(&port->lock);
- memcpy(uuid->b, &guidl, sizeof(u64));
- memcpy(uuid->b + 8, &guidh, sizeof(u64));
+ opae_memcpy(uuid->b, &guidl, sizeof(u64));
+ opae_memcpy(uuid->b + 8, &guidh, sizeof(u64));
return 0;
}
return -EINVAL;
}
- memset(&info, 0, sizeof(struct fpga_pr_info));
+ opae_memset(&info, 0, sizeof(struct fpga_pr_info));
info.flags = FPGA_MGR_PARTIAL_RECONFIG;
info.port_id = port_id;
{
struct opae_accelerator *acc;
- opae_log("=====%s=====\n", __func__);
- opae_log("OPAE Adapter %s\n", adapter->name);
- opae_log("OPAE Adapter OPs = %p\n", adapter->ops);
- opae_log("OPAE Adapter Private Data = %p\n", adapter->data);
- opae_log("OPAE Manager (downstream) = %p\n", adapter->mgr);
-
if (verbose) {
+ opae_log("=====%s=====\n", __func__);
+ opae_log("OPAE Adapter %s\n", adapter->name);
+ opae_log("OPAE Adapter OPs = %p\n", adapter->ops);
+ opae_log("OPAE Adapter Private Data = %p\n", adapter->data);
+ opae_log("OPAE Manager (downstream) = %p\n", adapter->mgr);
+
if (adapter->mgr)
opae_manager_dump(adapter->mgr);
if (adapter->data)
opae_adapter_data_dump(adapter->data);
- }
- opae_log("==========================\n");
+ opae_log("==========================\n");
+ }
}
ret = adapter->ops->enumerate(adapter);
if (!ret)
- opae_adapter_dump(adapter, 1);
+ opae_adapter_dump(adapter, 0);
return ret;
}
#define msleep(x) opae_udelay(1000 * (x))
#define usleep_range(min, max) msleep(DIV_ROUND_UP(min, 1000))
+#define opae_memset(a, b, c) memset((a), (b), (c))
#endif
}
#define opae_free(addr) free(addr)
+#define opae_memcpy(a, b, c) memcpy((a), (b), (c))
#endif
#include <rte_log.h>
#include <rte_io.h>
#include <rte_malloc.h>
+#include <rte_memcpy.h>
#define dev_printf(level, fmt, args...) \
RTE_LOG(level, PMD, "osdep_rte: " fmt, ## args)
#define spinlock_lock(x) rte_spinlock_lock(x)
#define spinlock_unlock(x) rte_spinlock_unlock(x)
+#define opae_memcpy(a, b, c) rte_memcpy((a), (b), (c))
#endif