From: Ira Weiny <ira.weiny@intel.com>
To: Dan Williams <dan.j.williams@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Dave Jiang <dave.jiang@intel.com>,
"Alison Schofield" <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
<linux-cxl@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Ira Weiny <ira.weiny@intel.com>
Subject: RE: [PATCH] cxl/mbox: Fix debug message print
Date: Tue, 1 Aug 2023 11:45:05 -0700 [thread overview]
Message-ID: <64c952b14b4e8_26168294af@iweiny-mobl.notmuch> (raw)
In-Reply-To: <64c831da6af64_52483294fb@dwillia2-xfh.jf.intel.com.notmuch>
Dan Williams wrote:
> Ira Weiny wrote:
> > The handle value used to report an event being cleared by dev_dbg() is
> > incorrect due to a post increment of the payload handle index.
> >
> > Delay the increment of the index until after the print. Also add the
> > debugging for event processing which was useful in finding this bug.
> >
> > To: Davidlohr Bueso <dave@stgolabs.net>
> > To: Jonathan Cameron <jonathan.cameron@huawei.com>
> > To: Dave Jiang <dave.jiang@intel.com>
> > To: Alison Schofield <alison.schofield@intel.com>
> > To: Vishal Verma <vishal.l.verma@intel.com>
> > To: Dan Williams <dan.j.williams@intel.com>
>
> Is this some new process recommendation to use "To:", I would only
> expect Cc: for maintainers.
It is just what b4 does because all those folks are listed as maintainers.
>
> > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Jonathan gets listed twice because?
That is odd. I did not notice that.
>
> > Cc: linux-cxl@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
>
> I assume this is because b4 takes its address from the patch itself?
>
> It just feels a bit too noisy.
Yea b4 generated the list and I just copied it here. Vishal is correct
that this is automatically put in the tracking cover letter commit b4 uses
but I copied it here because it was not a series. I'll skip this in the
future.
>
> > Signed-off-by: Ira Weiny <ira.weiny@intel.com>
> > ---
> > NOTE: This does fix a bug in the patch referenced below. However, I
> > don't think that warrants back porting because this is only a debug
> > print.
>
> I don't think that's a reason not to flag for backport. Smaller things
> than this have been backported, and if it saves someone getting confused
> in the field its worth it.
Ok.
>
> >
> > Fixes: 6ebe28f9ec72 ("cxl/mem: Read, trace, and clear events on driver load")
> > ---
> > drivers/cxl/core/mbox.c | 9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> > index d6d067fbee97..f052d5f174ee 100644
> > --- a/drivers/cxl/core/mbox.c
> > +++ b/drivers/cxl/core/mbox.c
> > @@ -882,9 +882,10 @@ static int cxl_clear_event_record(struct cxl_memdev_state *mds,
> > */
> > i = 0;
> > for (cnt = 0; cnt < total; cnt++) {
> > - payload->handles[i++] = get_pl->records[cnt].hdr.handle;
> > + payload->handles[i] = get_pl->records[cnt].hdr.handle;
> > dev_dbg(mds->cxlds.dev, "Event log '%d': Clearing %u\n", log,
> > le16_to_cpu(payload->handles[i]));
> > + i++;
> >
> > if (i == max_handles) {
> > payload->nr_recs = i;
> > @@ -946,9 +947,13 @@ static void cxl_mem_get_records_log(struct cxl_memdev_state *mds,
> > if (!nr_rec)
> > break;
> >
> > - for (i = 0; i < nr_rec; i++)
> > + for (i = 0; i < nr_rec; i++) {
> > + dev_dbg(dev, "Event log %d: processing handle %u\n",
> > + type,
> > + le16_to_cpu(payload->records[i].hdr.handle));
> > cxl_event_trace_record(cxlmd, type,
> > &payload->records[i]);
>
> This looks unrelated to the fix.
It helped me to debug the issue. Since you want this marked as a fix for
backport I will split this out. Potentially just squash it into some
other patch or make it stand alone.
Ira
next prev parent reply other threads:[~2023-08-01 18:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 20:52 [PATCH] cxl/mbox: Fix debug message print Ira Weiny
2023-07-31 21:53 ` Dave Jiang
2023-07-31 22:12 ` Dan Williams
2023-07-31 22:25 ` Verma, Vishal L
2023-08-01 18:45 ` Ira Weiny [this message]
2023-08-01 1:24 ` Alison Schofield
2023-08-01 18:48 ` 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=64c952b14b4e8_26168294af@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