* [PATCH v2 0/2] CXL/events: Fix and improve event dev_dbg() messages
@ 2023-08-01 20:13 Ira Weiny
2023-08-01 20:13 ` [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message Ira Weiny
2023-08-01 20:13 ` [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Ira Weiny
0 siblings, 2 replies; 12+ messages in thread
From: Ira Weiny @ 2023-08-01 20:13 UTC (permalink / raw)
To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
Vishal Verma, Dan Williams
Cc: linux-cxl, linux-kernel, Ira Weiny
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
Changes in v2:
- [Dan] split fix from additional debug message
- Link to v1: https://lore.kernel.org/r/20230731-cxl-fix-clear-event-debug-print-v1-1-42c068f500d1@intel.com
---
Ira Weiny (2):
cxl/mbox: Use correct handle in events debug message
cxl/mbox: Add handle to event processing debug
drivers/cxl/core/mbox.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
base-commit: 5d0c230f1de8c7515b6567d9afba1f196fb4e2f4
change-id: 20230731-cxl-fix-clear-event-debug-print-3b57da0e956c
Best regards,
--
Ira Weiny <ira.weiny@intel.com>
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message 2023-08-01 20:13 [PATCH v2 0/2] CXL/events: Fix and improve event dev_dbg() messages Ira Weiny @ 2023-08-01 20:13 ` Ira Weiny 2023-08-01 20:41 ` Dave Jiang ` (2 more replies) 2023-08-01 20:13 ` [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Ira Weiny 1 sibling, 3 replies; 12+ messages in thread From: Ira Weiny @ 2023-08-01 20:13 UTC (permalink / raw) To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield, Vishal Verma, Dan Williams Cc: linux-cxl, linux-kernel, Ira Weiny 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. Fixes: 6ebe28f9ec72 ("cxl/mem: Read, trace, and clear events on driver load") Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- Changes for v2 [Dan] Go ahead and mark this for backporting [Dan] Remove 'To/Cc' cruft from individual patches [Dan/Alison] Split out the additional debugging [Alison] New oneliner --- drivers/cxl/core/mbox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index d6d067fbee97..a1c490f66bbf 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; -- 2.41.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message 2023-08-01 20:13 ` [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message Ira Weiny @ 2023-08-01 20:41 ` Dave Jiang 2023-08-02 16:26 ` Alison Schofield 2023-08-04 12:16 ` Jonathan Cameron 2 siblings, 0 replies; 12+ messages in thread From: Dave Jiang @ 2023-08-01 20:41 UTC (permalink / raw) To: Ira Weiny, Davidlohr Bueso, Jonathan Cameron, Alison Schofield, Vishal Verma, Dan Williams Cc: linux-cxl, linux-kernel On 8/1/23 13:13, 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. > > Fixes: 6ebe28f9ec72 ("cxl/mem: Read, trace, and clear events on driver load") > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> > > --- > Changes for v2 > [Dan] Go ahead and mark this for backporting > [Dan] Remove 'To/Cc' cruft from individual patches > [Dan/Alison] Split out the additional debugging > [Alison] New oneliner > --- > drivers/cxl/core/mbox.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index d6d067fbee97..a1c490f66bbf 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; > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message 2023-08-01 20:13 ` [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message Ira Weiny 2023-08-01 20:41 ` Dave Jiang @ 2023-08-02 16:26 ` Alison Schofield 2023-08-04 12:16 ` Jonathan Cameron 2 siblings, 0 replies; 12+ messages in thread From: Alison Schofield @ 2023-08-02 16:26 UTC (permalink / raw) To: Ira Weiny Cc: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Vishal Verma, Dan Williams, linux-cxl, linux-kernel On Tue, Aug 01, 2023 at 01:13:28PM -0700, 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. > > Fixes: 6ebe28f9ec72 ("cxl/mem: Read, trace, and clear events on driver load") > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> > > --- > Changes for v2 > [Dan] Go ahead and mark this for backporting > [Dan] Remove 'To/Cc' cruft from individual patches > [Dan/Alison] Split out the additional debugging > [Alison] New oneliner > --- > drivers/cxl/core/mbox.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index d6d067fbee97..a1c490f66bbf 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; > > -- > 2.41.0 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message 2023-08-01 20:13 ` [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message Ira Weiny 2023-08-01 20:41 ` Dave Jiang 2023-08-02 16:26 ` Alison Schofield @ 2023-08-04 12:16 ` Jonathan Cameron 2 siblings, 0 replies; 12+ messages in thread From: Jonathan Cameron @ 2023-08-04 12:16 UTC (permalink / raw) To: Ira Weiny Cc: Davidlohr Bueso, Dave Jiang, Alison Schofield, Vishal Verma, Dan Williams, linux-cxl, linux-kernel On Tue, 01 Aug 2023 13:13:28 -0700 Ira Weiny <ira.weiny@intel.com> 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. > > Fixes: 6ebe28f9ec72 ("cxl/mem: Read, trace, and clear events on driver load") > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > FWIW given how well this has already been reviewed. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > Changes for v2 > [Dan] Go ahead and mark this for backporting > [Dan] Remove 'To/Cc' cruft from individual patches > [Dan/Alison] Split out the additional debugging > [Alison] New oneliner > --- > drivers/cxl/core/mbox.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index d6d067fbee97..a1c490f66bbf 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; > ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug 2023-08-01 20:13 [PATCH v2 0/2] CXL/events: Fix and improve event dev_dbg() messages Ira Weiny 2023-08-01 20:13 ` [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message Ira Weiny @ 2023-08-01 20:13 ` Ira Weiny 2023-08-01 20:41 ` Dave Jiang ` (2 more replies) 1 sibling, 3 replies; 12+ messages in thread From: Ira Weiny @ 2023-08-01 20:13 UTC (permalink / raw) To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield, Vishal Verma, Dan Williams Cc: linux-cxl, linux-kernel, Ira Weiny Knowing which handle is being processed helped in debugging new event code. Add a dev_dbg() message with this information. Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- drivers/cxl/core/mbox.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index a1c490f66bbf..f052d5f174ee 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -947,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]); + } if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW) trace_cxl_overflow(cxlmd, type, payload); -- 2.41.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug 2023-08-01 20:13 ` [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Ira Weiny @ 2023-08-01 20:41 ` Dave Jiang 2023-08-02 16:29 ` Alison Schofield 2023-08-03 17:26 ` Alison Schofield 2 siblings, 0 replies; 12+ messages in thread From: Dave Jiang @ 2023-08-01 20:41 UTC (permalink / raw) To: Ira Weiny, Davidlohr Bueso, Jonathan Cameron, Alison Schofield, Vishal Verma, Dan Williams Cc: linux-cxl, linux-kernel On 8/1/23 13:13, Ira Weiny wrote: > Knowing which handle is being processed helped in debugging new event > code. Add a dev_dbg() message with this information. > > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> > --- > drivers/cxl/core/mbox.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index a1c490f66bbf..f052d5f174ee 100644 > --- a/drivers/cxl/core/mbox.c > +++ b/drivers/cxl/core/mbox.c > @@ -947,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]); > + } > > if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW) > trace_cxl_overflow(cxlmd, type, payload); > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug 2023-08-01 20:13 ` [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Ira Weiny 2023-08-01 20:41 ` Dave Jiang @ 2023-08-02 16:29 ` Alison Schofield 2023-08-03 5:05 ` Ira Weiny 2023-08-03 17:26 ` Alison Schofield 2 siblings, 1 reply; 12+ messages in thread From: Alison Schofield @ 2023-08-02 16:29 UTC (permalink / raw) To: Ira Weiny Cc: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Vishal Verma, Dan Williams, linux-cxl, linux-kernel On Tue, Aug 01, 2023 at 01:13:29PM -0700, Ira Weiny wrote: > Knowing which handle is being processed helped in debugging new event > code. Add a dev_dbg() message with this information. > > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > --- > drivers/cxl/core/mbox.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index a1c490f66bbf..f052d5f174ee 100644 > --- a/drivers/cxl/core/mbox.c > +++ b/drivers/cxl/core/mbox.c > @@ -947,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]); > + } Is dev_dbg() overkill when the info is in the trace event? > > if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW) > trace_cxl_overflow(cxlmd, type, payload); > > -- > 2.41.0 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug 2023-08-02 16:29 ` Alison Schofield @ 2023-08-03 5:05 ` Ira Weiny 2023-08-03 17:26 ` Alison Schofield 0 siblings, 1 reply; 12+ messages in thread From: Ira Weiny @ 2023-08-03 5:05 UTC (permalink / raw) To: Alison Schofield, Ira Weiny Cc: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Vishal Verma, Dan Williams, linux-cxl, linux-kernel Alison Schofield wrote: > On Tue, Aug 01, 2023 at 01:13:29PM -0700, Ira Weiny wrote: > > Knowing which handle is being processed helped in debugging new event > > code. Add a dev_dbg() message with this information. > > > > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > > --- > > drivers/cxl/core/mbox.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > > index a1c490f66bbf..f052d5f174ee 100644 > > --- a/drivers/cxl/core/mbox.c > > +++ b/drivers/cxl/core/mbox.c > > @@ -947,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]); > > + } > > Is dev_dbg() overkill when the info is in the trace event? The trace event will not happen if tracing is not turned on. This was all part of my testing the DCD events which don't have to, and likely will not, have tracing on. So this helped to track which handles were being processed from the cxl-test and qemu layers. Ira > > > > > if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW) > > trace_cxl_overflow(cxlmd, type, payload); > > > > -- > > 2.41.0 > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug 2023-08-03 5:05 ` Ira Weiny @ 2023-08-03 17:26 ` Alison Schofield 2023-08-04 12:17 ` Jonathan Cameron 0 siblings, 1 reply; 12+ messages in thread From: Alison Schofield @ 2023-08-03 17:26 UTC (permalink / raw) To: Ira Weiny Cc: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Vishal Verma, Dan Williams, linux-cxl, linux-kernel On Wed, Aug 02, 2023 at 10:05:56PM -0700, Ira Weiny wrote: > Alison Schofield wrote: > > On Tue, Aug 01, 2023 at 01:13:29PM -0700, Ira Weiny wrote: > > > Knowing which handle is being processed helped in debugging new event > > > code. Add a dev_dbg() message with this information. > > > > > > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > > > --- > > > drivers/cxl/core/mbox.c | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > > > index a1c490f66bbf..f052d5f174ee 100644 > > > --- a/drivers/cxl/core/mbox.c > > > +++ b/drivers/cxl/core/mbox.c > > > @@ -947,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]); > > > + } > > > > Is dev_dbg() overkill when the info is in the trace event? > > The trace event will not happen if tracing is not turned on. > > This was all part of my testing the DCD events which don't have to, and > likely will not, have tracing on. So this helped to track which handles > were being processed from the cxl-test and qemu layers. > > Ira Thanks for explaining! > > > > > > > > > if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW) > > > trace_cxl_overflow(cxlmd, type, payload); > > > > > > -- > > > 2.41.0 > > > > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug 2023-08-03 17:26 ` Alison Schofield @ 2023-08-04 12:17 ` Jonathan Cameron 0 siblings, 0 replies; 12+ messages in thread From: Jonathan Cameron @ 2023-08-04 12:17 UTC (permalink / raw) To: Alison Schofield Cc: Ira Weiny, Davidlohr Bueso, Dave Jiang, Vishal Verma, Dan Williams, linux-cxl, linux-kernel On Thu, 3 Aug 2023 10:26:00 -0700 Alison Schofield <alison.schofield@intel.com> wrote: > On Wed, Aug 02, 2023 at 10:05:56PM -0700, Ira Weiny wrote: > > Alison Schofield wrote: > > > On Tue, Aug 01, 2023 at 01:13:29PM -0700, Ira Weiny wrote: > > > > Knowing which handle is being processed helped in debugging new event > > > > code. Add a dev_dbg() message with this information. > > > > > > > > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > > > > --- > > > > drivers/cxl/core/mbox.c | 6 +++++- > > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > > > > index a1c490f66bbf..f052d5f174ee 100644 > > > > --- a/drivers/cxl/core/mbox.c > > > > +++ b/drivers/cxl/core/mbox.c > > > > @@ -947,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]); > > > > + } > > > > > > Is dev_dbg() overkill when the info is in the trace event? > > > > The trace event will not happen if tracing is not turned on. > > > > This was all part of my testing the DCD events which don't have to, and > > likely will not, have tracing on. So this helped to track which handles > > were being processed from the cxl-test and qemu layers. > > > > Ira > > Thanks for explaining! Good to have that detail in the commit message as it's good justification for the change. Otherwise LGTM. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > > > > > > > > > > > if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW) > > > > trace_cxl_overflow(cxlmd, type, payload); > > > > > > > > -- > > > > 2.41.0 > > > > > > > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug 2023-08-01 20:13 ` [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Ira Weiny 2023-08-01 20:41 ` Dave Jiang 2023-08-02 16:29 ` Alison Schofield @ 2023-08-03 17:26 ` Alison Schofield 2 siblings, 0 replies; 12+ messages in thread From: Alison Schofield @ 2023-08-03 17:26 UTC (permalink / raw) To: Ira Weiny Cc: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Vishal Verma, Dan Williams, linux-cxl, linux-kernel On Tue, Aug 01, 2023 at 01:13:29PM -0700, Ira Weiny wrote: > Knowing which handle is being processed helped in debugging new event > code. Add a dev_dbg() message with this information. > > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> > --- > drivers/cxl/core/mbox.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index a1c490f66bbf..f052d5f174ee 100644 > --- a/drivers/cxl/core/mbox.c > +++ b/drivers/cxl/core/mbox.c > @@ -947,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]); > + } > > if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW) > trace_cxl_overflow(cxlmd, type, payload); > > -- > 2.41.0 > ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-08-04 12:17 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-08-01 20:13 [PATCH v2 0/2] CXL/events: Fix and improve event dev_dbg() messages Ira Weiny 2023-08-01 20:13 ` [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message Ira Weiny 2023-08-01 20:41 ` Dave Jiang 2023-08-02 16:26 ` Alison Schofield 2023-08-04 12:16 ` Jonathan Cameron 2023-08-01 20:13 ` [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Ira Weiny 2023-08-01 20:41 ` Dave Jiang 2023-08-02 16:29 ` Alison Schofield 2023-08-03 5:05 ` Ira Weiny 2023-08-03 17:26 ` Alison Schofield 2023-08-04 12:17 ` Jonathan Cameron 2023-08-03 17:26 ` Alison Schofield
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox