From: Davidlohr Bueso <dave@stgolabs.net>
To: dan.j.williams@intel.com
Cc: dave.jiang@intel.com, vishal.l.verma@intel.com,
Jonathan.Cameron@huawei.com, fan.ni@samsung.com,
a.manzanares@samsung.com, dave@stgolabs.net,
linux-cxl@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Subject: [PATCH 1/7] cxl/mbox: Allow for IRQ_NONE case in the isr
Date: Mon, 12 Jun 2023 11:10:32 -0700 [thread overview]
Message-ID: <20230612181038.14421-2-dave@stgolabs.net> (raw)
In-Reply-To: <20230612181038.14421-1-dave@stgolabs.net>
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)
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
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;
}
--
2.41.0
next prev parent reply other threads:[~2023-06-12 18:45 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 ` Davidlohr Bueso [this message]
2023-06-13 12:49 ` [PATCH 1/7] cxl/mbox: Allow for IRQ_NONE case in the isr Jonathan Cameron
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=20230612181038.14421-2-dave@stgolabs.net \
--to=dave@stgolabs.net \
--cc=Jonathan.Cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--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