git: fa2d4a22fa82 - main - mana: add rmb load fence to comply with hw spec
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Aug 2022 07:49:50 UTC
The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=fa2d4a22fa82665a778e2f700e3318efebf2d87f commit fa2d4a22fa82665a778e2f700e3318efebf2d87f Author: Wei Hu <whu@FreeBSD.org> AuthorDate: 2022-08-15 07:36:09 +0000 Commit: Wei Hu <whu@FreeBSD.org> CommitDate: 2022-08-15 07:39:15 +0000 mana: add rmb load fence to comply with hw spec To ensure software reads fresh data after observing ownership bits. Sponsored by: Microsoft --- sys/dev/mana/gdma_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index 27275252dc4f..6b4e87d169de 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -556,6 +556,8 @@ mana_gd_process_eq_events(void *arg) break; } + rmb(); + mana_gd_process_eqe(eq); eq->head++; @@ -1366,6 +1368,8 @@ mana_gd_read_cqe(struct gdma_queue *cq, struct gdma_comp *comp) return -1; } + rmb(); + comp->wq_num = cqe->cqe_info.wq_num; comp->is_sq = cqe->cqe_info.is_sq; memcpy(comp->cqe_data, cqe->cqe_data, GDMA_COMP_DATA_SIZE);