From nobody Mon Aug 15 07:49:50 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M5mdq298Mz4YlWs; Mon, 15 Aug 2022 07:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M5mdq1kFWz3pfs; Mon, 15 Aug 2022 07:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660549791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R53KndMx4Crdq9bPR+6GAzeRf5psgRoZEiu/fxBQZi0=; b=XheQ8MMmNzwFlq59jagKbW18Hllqud0imJ4G9oBIgn6stycgbMZQTQq6G3UBy57oZQakKb xLaZp8ASm6CbPgC6T92EJyd4KzNztSvBPZZ0vOvyjd4jDLE1uncgCAahPXfC5EA745hlT4 3nXRDknbH/wzBScwvQHeJRPcPMjgPE+FnFkRmL2QGUNcitQdBOAPb8zvP1xP4BMIWLZPc7 MACl6yQiIOqRoEegazlxuK/STr2qWNjBQ5iF8I0ma02VObRGb0XS6aG51cE7/6oJpRHBrt 4yTHU8qwiuLm5x5BI6/bCV2yiaiOEvLE2SP24JKsXogOWbcDa2zQtMUCRONrDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M5mdq0LtszMXq; Mon, 15 Aug 2022 07:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27F7norm084933; Mon, 15 Aug 2022 07:49:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27F7nobU084932; Mon, 15 Aug 2022 07:49:50 GMT (envelope-from git) Date: Mon, 15 Aug 2022 07:49:50 GMT Message-Id: <202208150749.27F7nobU084932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: fa2d4a22fa82 - main - mana: add rmb load fence to comply with hw spec List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa2d4a22fa82665a778e2f700e3318efebf2d87f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660549791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R53KndMx4Crdq9bPR+6GAzeRf5psgRoZEiu/fxBQZi0=; b=Qv/tmKWVdDSawZ/prB7/kTjoAfYx7tbW6KulI3C5bpcaxYo3HKUPI+/adkuyNS/O1DIXYh KOXYlQhS/L5VORzKqDAKphiO7n3raMqRiYpD9Sh1BvDPZ+OnEQH9JhRu7aLjECLU/SRYXZ A4ZYUsPhMU1L4Rl1TATnuXQeV5MT/Rs09U7s5xo3kvJpyLfCeBiS3N8LdcN0idMll0hKBo 3t3OEYai+T9InjEz3fO0kuuN7b4nlU6nomUU2idY2dUHHpEQH6i2nFEMk6XMvWID+aPE7B XVtvWzwWhb+QsR9+WGmU8DAjtlTRtrewtpjxS9YASgWRDXgStFNsNHGsjg7zqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660549791; a=rsa-sha256; cv=none; b=I0b0LyNAuq4obvLvLTljrJPQeBH6xvhYD1gJ05r0Pb+x68IMFtsVGvPPh0nkrBGZe+EwnV B+kFP37nxUedRgB+OhSa10i9/hT+yXNaa7t754uLQV6Ru12M5yTVyoW1xK8Xnc7pr9fFZx 2+oZou5jSbFQcxV0mBYXSkPOrYAAouYckS44dCVeNivu6MIrFmhdn8asBs0j9sqvSrt0Ac Rnhl7PWZNwswuFHKfYWxVnvwRehaqDOGKFzP8ArCI41Jv3OnzZlgJ3uk32L1ooMSNngN3t 4kREyjgKe2Vr0RZMuGRLT6PpFcJm1nYPxh8vy7Nfk9upI+Y4NCuWqQy4I0eURg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=fa2d4a22fa82665a778e2f700e3318efebf2d87f commit fa2d4a22fa82665a778e2f700e3318efebf2d87f Author: Wei Hu AuthorDate: 2022-08-15 07:36:09 +0000 Commit: Wei Hu 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);