Linux CXL
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: 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, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH v2 3/4] cxl/core: Add region info to cxl_general_media and cxl_dram events
Date: Tue, 23 Apr 2024 09:37:49 -0700	[thread overview]
Message-ID: <Zifj3Y9not9qNc8+@aschofie-mobl2> (raw)
In-Reply-To: <662737c4b3e7_bd77929478@iweiny-mobl.notmuch>

On Mon, Apr 22, 2024 at 09:23:32PM -0700, Ira Weiny wrote:
> alison.schofield@ wrote:
> > From: Alison Schofield <alison.schofield@intel.com>
> > 
> 
> [snip]
> 
> > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
> > index 161bdb5734b0..2e24364b2b8d 100644
> > --- a/drivers/cxl/core/trace.h
> > +++ b/drivers/cxl/core/trace.h
> > @@ -14,6 +14,28 @@
> >  #include <cxlmem.h>
> >  #include "core.h"
> >  
> > +#ifndef __CXL_EVENTS_DECLARE_ONCE_ONLY
> > +#define __CXL_EVENTS_DECLARE_ONCE_ONLY
> > +static inline
> > +void store_region_info(const struct cxl_memdev *cxlmd, u64 dpa, uuid_t *uuid,
> > +		       u64 *hpa)
> > +{
> > +	struct cxl_region *cxlr;
> > +
> > +	cxlr = cxl_dpa_to_region(cxlmd, dpa);
> 
> This would normally be:  (somewhat nitty though...)
> 
> 	if (!cxlr) {
> 		uuid_copy(uuid, &uuid_null);
> 		*hpa = ULLONG_MAX;
> 		return;
> 	}
> 
> 	uuid_copy(uuid, &cxlr->params.uuid);
> 	*hpa = cxl_trace_hpa(cxlr, cxlmd, dpa);
> }
> 
> But in this context I don't think it is critical.

Thanks for pointing out. When I switch to inline I didn't
'see' that. I'd like to fix it up. Let me see what else 
comes in.

--Alison

> 
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> 
> 
> [snip]

  reply	other threads:[~2024-04-23 16:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  3:48 [PATCH v2 0/4] Add DPA->HPA translation to dram & general_media alison.schofield
2024-04-23  3:48 ` [PATCH v2 1/4] cxl/region: Move cxl_dpa_to_region() work to the region driver alison.schofield
2024-04-23  3:48 ` [PATCH v2 2/4] cxl/region: Move cxl_trace_hpa() " alison.schofield
2024-04-23  3:48 ` [PATCH v2 3/4] cxl/core: Add region info to cxl_general_media and cxl_dram events alison.schofield
2024-04-23  4:23   ` Ira Weiny
2024-04-23 16:37     ` Alison Schofield [this message]
2024-04-24  5:17   ` Dan Williams
2024-04-24 19:47     ` Alison Schofield
2024-04-25  3:47       ` Dan Williams
2024-04-23  3:48 ` [PATCH v2 4/4] cxl/core: Remove cxlr dependency from cxl_poison trace events alison.schofield
2024-04-24  5:33   ` Dan Williams
2024-04-24 19:57     ` Alison Schofield

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=Zifj3Y9not9qNc8+@aschofie-mobl2 \
    --to=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=rostedt@goodmis.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