From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: <dave.jiang@intel.com>, <dan.j.williams@intel.com>,
<alison.schofield@intel.com>, <vishal.l.verma@intel.com>,
<ira.weiny@intel.com>, <jgroves@micron.com>,
<ravis.opensrc@micron.com>, <fan.ni@samsung.com>,
<anisa.su@samsung.com>, <a.manzanares@samsung.com>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH 6/7] cxl/mbox: Shout upon async bgcmd race
Date: Mon, 23 Jun 2025 15:50:49 +0100 [thread overview]
Message-ID: <20250623155049.00006f14@huawei.com> (raw)
In-Reply-To: <20250617193611.564668-7-dave@stgolabs.net>
On Tue, 17 Jun 2025 12:36:10 -0700
Davidlohr Bueso <dave@stgolabs.net> wrote:
> Make the condition a warning, as the mailbox will be corrupted
> on such cases, which may trigger harder to debug issues down the
> line when simply returning a common error.
This is a little confusing. I assume it is meant to be impossible to hit
this race?
>
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
> drivers/cxl/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> index 6ada0f502914..6404b01b64c9 100644
> --- a/drivers/cxl/pci.c
> +++ b/drivers/cxl/pci.c
> @@ -326,7 +326,7 @@ static int __cxl_pci_mbox_send_cmd(struct cxl_mailbox *cxl_mbox,
> mbox_cmd->user) {
> int timeout;
>
> - if (mds->bg.opcode)
> + if (WARN_ON_ONCE(mds->bg.opcode))
> return -EBUSY;
>
> /* give first timeout a second */
next prev parent reply other threads:[~2025-06-23 14:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 19:36 [PATCH 0/7] cxl: Activate FW and userspace bgcmds Davidlohr Bueso
2025-06-17 19:36 ` [PATCH 1/7] cxl/mbox: Track background commands from CEL Davidlohr Bueso
2025-06-23 14:16 ` Jonathan Cameron
2025-06-23 16:19 ` Davidlohr Bueso
2025-06-17 19:36 ` [PATCH 2/7] cxl/mbox: Handle Activate FW as async bg Davidlohr Bueso
2025-06-23 14:22 ` Jonathan Cameron
2025-06-17 19:36 ` [PATCH 3/7] cxl/pci: Lockless background synchronous polling Davidlohr Bueso
2025-06-23 14:29 ` Jonathan Cameron
2025-06-23 16:23 ` Davidlohr Bueso
2025-06-17 19:36 ` [PATCH 4/7] cxl/mbox: Stronger cxl_mbox_background_complete() semantics Davidlohr Bueso
2025-06-23 14:31 ` Jonathan Cameron
2025-06-17 19:36 ` [PATCH 5/7] cxl/mbox: Allow userspace background commands Davidlohr Bueso
2025-06-23 14:49 ` Jonathan Cameron
2025-06-17 19:36 ` [PATCH 6/7] cxl/mbox: Shout upon async bgcmd race Davidlohr Bueso
2025-06-23 14:50 ` Jonathan Cameron [this message]
2025-06-23 16:14 ` Davidlohr Bueso
2025-06-17 21:52 ` [PATCH 0/7] cxl: Activate FW and userspace bgcmds Davidlohr Bueso
2025-06-17 22:15 ` [PATCH 7/7] cxl/mbox: Add Populate Log support Davidlohr Bueso
2025-06-23 14:51 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250623155049.00006f14@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=alison.schofield@intel.com \
--cc=anisa.su@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=jgroves@micron.com \
--cc=linux-cxl@vger.kernel.org \
--cc=ravis.opensrc@micron.com \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.