Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion providers/hns/hns_roce_u_hw_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static void hns_roce_update_sq_db(struct hns_roce_context *ctx,

static void hns_roce_write512(uint64_t *dest, uint64_t *val)
{
mmio_memcpy_x64(dest, val, sizeof(struct hns_roce_rc_sq_wqe));
mmio_memcpy_x64(dest, val, 1 << HNS_ROCE_SQWQE_SHIFT);
}

static void hns_roce_write_dwqe(struct hns_roce_qp *qp, void *wqe)
Expand Down
2 changes: 1 addition & 1 deletion util/mmio.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static inline void _mmio_memcpy_x64(void *dest, const void *src, size_t bytecnt)

#define mmio_memcpy_x64(dest, src, bytecount) \
({ \
if (__builtin_constant_p((bytecount) == 64)) \
if (__builtin_constant_p(bytecount) && (bytecount) == 64) \
_mmio_memcpy_x64_64b((dest), (src)); \
else \
_mmio_memcpy_x64((dest), (src), (bytecount)); \
Expand Down