From: Ira Weiny <ira.weiny@intel.com>
To: Alison Schofield <alison.schofield@intel.com>,
Ira Weiny <ira.weiny@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Dave Jiang <dave.jiang@intel.com>,
"Vishal Verma" <vishal.l.verma@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
<linux-cxl@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC] cxl/pci: Skip irq features if irq's are not supported
Date: Wed, 10 Jan 2024 08:51:23 -0800 [thread overview]
Message-ID: <659ecb0b70b8f_a3379294e9@iweiny-mobl.notmuch> (raw)
In-Reply-To: <ZZ3W5q4UzvLJ9kG+@aschofie-mobl2>
Alison Schofield wrote:
> On Mon, Jan 08, 2024 at 11:51:13PM -0800, Ira Weiny wrote:
> > CXL 3.1 Section 3.1.1 states:
> >
[snip]
> > /**
> > diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> > index 0155fb66b580..bb90ac011290 100644
> > --- a/drivers/cxl/pci.c
> > +++ b/drivers/cxl/pci.c
> > @@ -443,6 +443,12 @@ static int cxl_pci_setup_mailbox(struct cxl_memdev_state *mds)
> > if (!(cap & CXLDEV_MBOX_CAP_BG_CMD_IRQ))
> > return 0;
> >
> > + if (!cxlds->irq_supported) {
> > + dev_err(cxlds->dev, "Mailbox interrupts enabled but device indicates no interrupt vectors supported.\n");
> > + dev_err(cxlds->dev, "Skip mailbox iterrupt configuration.\n");
> > + return 0;
> > + }
> > +
>
> Commit msg says dev_warn() yet here it is dev_err()
>
> Can you fit in one msg, something like:
> "Device does not support mailbox interrupts\n"
>
> Perhaps skip the hard stops. No other dev_*() in this file adds them.
Dan had comments on cleaning up the error messages. I'll do those.
> Documentation/process/coding-style.rst
>
> Spellcheck
Thanks.
[snip]
> >
> > static irqreturn_t cxl_event_thread(int irq, void *id)
> > @@ -754,6 +762,13 @@ static int cxl_event_config(struct pci_host_bridge *host_bridge,
> > if (!host_bridge->native_cxl_error)
> > return 0;
> >
> > + /* Polling not supported */
>
> I understand this comment while reading it in the context of this patch.
> Lacking that context, maybe it deserves a bit more like you wrote in
> the commit log. Be clear that it's the driver that is not supporting
> polling, and when if or when the driver does add polling support they'll
> be an alternative method for processing events. IIUC ;)
Yea I wanted to make it clear that polling is an option for the driver but
it was not supported because I don't anticipate the need. But should a
device come along which requires polling (ie no irq support) it would be
nice to leave breadcrumbs... but...
>
>
> > + if (!mds->cxlds.irq_supported) {
> > + dev_err(mds->cxlds.dev, "Host events enabled but device indicates no interrupt vectors supported.\n");
> > + dev_err(mds->cxlds.dev, "Event polling is not supported, skip event processing.\n");
... here I mention polling not supported which is redundant to the
comment. Comment should be deleted.
> > + return 0;
> > + }
>
> Similar to above
Yep will clean up based on Dan's feedback.
Thanks for the review!
Ira
[snip]
next prev parent reply other threads:[~2024-01-10 16:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 7:51 [PATCH RFC] cxl/pci: Skip irq features if irq's are not supported Ira Weiny
2024-01-09 23:29 ` Alison Schofield
2024-01-10 16:51 ` Ira Weiny [this message]
2024-01-10 0:22 ` Dan Williams
2024-01-10 17:13 ` Ira Weiny
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=659ecb0b70b8f_a3379294e9@iweiny-mobl.notmuch \
--to=ira.weiny@intel.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@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