From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: <dan.j.williams@intel.com>, <dave.jiang@intel.com>,
<vishal.l.verma@intel.com>, <fan.ni@samsung.com>,
<a.manzanares@samsung.com>, <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH 1/7] cxl/mbox: Allow for IRQ_NONE case in the isr
Date: Tue, 13 Jun 2023 13:49:08 +0100 [thread overview]
Message-ID: <20230613134908.00002bee@Huawei.com> (raw)
In-Reply-To: <20230612181038.14421-2-dave@stgolabs.net>
On Mon, 12 Jun 2023 11:10:32 -0700
Davidlohr Bueso <dave@stgolabs.net> wrote:
> For cases when the mailbox background operation is not complete,
> do not "handle" the interrupt, as it was not from this device.
> And furthermore there are no racy scenarios such as the hw being
> out of sync with the driver and starting a new background op
> behind its back.
>
> Reported-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
> Fixes: ccadf1310fb (cxl/mbox: Add background cmd handling machinery)
Fixes is a bit strong for something that shouldn't be seen anyway.
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Otherwise LGTM
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> drivers/cxl/pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> index a78e40e6d0e0..4b2575502f49 100644
> --- a/drivers/cxl/pci.c
> +++ b/drivers/cxl/pci.c
> @@ -118,9 +118,11 @@ static irqreturn_t cxl_pci_mbox_irq(int irq, void *id)
> struct cxl_dev_id *dev_id = id;
> struct cxl_dev_state *cxlds = dev_id->cxlds;
>
> + if (!cxl_mbox_background_complete(cxlds))
> + return IRQ_NONE;
> +
> /* short-circuit the wait in __cxl_pci_mbox_send_cmd() */
> - if (cxl_mbox_background_complete(cxlds))
> - rcuwait_wake_up(&cxlds->mbox_wait);
> + rcuwait_wake_up(&cxlds->mbox_wait);
>
> return IRQ_HANDLED;
> }
next prev parent reply other threads:[~2023-06-13 12:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 18:10 [PATCH v6 0/7] cxl: Support device sanitation Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 1/7] cxl/mbox: Allow for IRQ_NONE case in the isr Davidlohr Bueso
2023-06-13 12:49 ` Jonathan Cameron [this message]
2023-06-13 18:11 ` Dave Jiang
2023-06-12 18:10 ` [PATCH 2/7] cxl/mem: Introduce security state sysfs file Davidlohr Bueso
2023-06-13 18:12 ` Dave Jiang
2023-06-12 18:10 ` [PATCH 3/7] cxl/mbox: Add sanitation handling machinery Davidlohr Bueso
2023-06-13 16:07 ` Jonathan Cameron
2023-06-13 16:28 ` Davidlohr Bueso
2023-06-14 8:36 ` Jonathan Cameron
2023-06-25 22:13 ` Dan Williams
2023-06-26 18:17 ` Davidlohr Bueso
2023-06-25 22:18 ` Dan Williams
2023-06-12 18:10 ` [PATCH 4/7] cxl/mem: Wire up Sanitation support Davidlohr Bueso
2023-06-25 22:34 ` Dan Williams
2023-06-12 18:10 ` [PATCH 5/7] cxl/test: Add Sanitize opcode support Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 6/7] cxl/mem: Support Secure Erase Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 7/7] cxl/test: Add Secure Erase opcode support Davidlohr Bueso
2023-06-13 15:26 ` [PATCH v6 0/7] cxl: Support device sanitation Jonathan Cameron
2023-06-13 15:51 ` Jonathan Cameron
2023-06-13 16:25 ` Davidlohr Bueso
2023-06-25 22:44 ` Dan Williams
2023-06-26 21:32 ` Davidlohr Bueso
2023-06-26 22:47 ` Dan Williams
2023-06-27 8:02 ` [PATCH] cxl/pci: Use correct flag for sanitize polling Davidlohr Bueso
2023-06-27 23:01 ` Dan Williams
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=20230613134908.00002bee@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=linux-cxl@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox