All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: <alison.schofield@intel.com>, Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>
Cc: <linux-cxl@vger.kernel.org>, Steven Rostedt <rostedt@goodmis.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH v2 3/4] cxl/core: Add region info to cxl_general_media and cxl_dram events
Date: Mon, 22 Apr 2024 21:23:32 -0700	[thread overview]
Message-ID: <662737c4b3e7_bd77929478@iweiny-mobl.notmuch> (raw)
In-Reply-To: <800328a3fdffa0f3ece709be337bd64a07089bff.1713842838.git.alison.schofield@intel.com>

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.

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


[snip]

  reply	other threads:[~2024-04-23  4:23 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 [this message]
2024-04-23 16:37     ` Alison Schofield
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=662737c4b3e7_bd77929478@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.