nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"Tsaur, Erwin" <erwin.tsaur@intel.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>
Subject: Re: [ndctl PATCH v2] Expose ndctl_bus_nfit_translate_spa as a public function.
Date: Wed, 3 Mar 2021 23:12:28 +0000	[thread overview]
Message-ID: <28b95b86506f9ecdd9ee7a6fc825dfc471d910b6.camel@intel.com> (raw)
In-Reply-To: <20210303211009.2913-1-erwin.tsaur@intel.com>

On Wed, 2021-03-03 at 13:10 -0800, Tsaur, Erwin wrote:
> The motivation is to allow access to ACPI defined NVDIMM Root Device
> _DSM Function Index 5(Translate SPA).  The rest of the _DSM functions,
> which are mostly ARS related, are already public.
> 
> Basically move ndctl_bus_nfit_translate_spa declaration from private.h
> to libndctl.h.
> 
> Changes from V1:
> - Group function declaration in libndctl.h with other ndctl_bus_* functions.
> 
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> Reviewed-by: Verma, Vishal L <vishal.l.verma@intel.com>

Hi Erwin,

I forgot to mention this for v1 but you're also missing your own Signed-
off-by. If you commit using 'git commit -s', that should automatically
add it for you.
Do you mind sending a v3 with that, and I'll get it queued up.

There's also a malformed email CC - I think you want to quote the --cc
line to git-send-email like: --cc="name <email>"

> ---
>  ndctl/lib/libndctl.sym | 4 ++++
>  ndctl/lib/nfit.c       | 2 +-
>  ndctl/lib/private.h    | 2 --
>  ndctl/libndctl.h       | 2 ++
>  4 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/ndctl/lib/libndctl.sym b/ndctl/lib/libndctl.sym
> index 0a82616..58afb74 100644
> --- a/ndctl/lib/libndctl.sym
> +++ b/ndctl/lib/libndctl.sym
> @@ -451,3 +451,7 @@ LIBNDCTL_25 {
>  	ndctl_bus_clear_fw_activate_nosuspend;
>  	ndctl_bus_activate_firmware;
>  } LIBNDCTL_24;
> +
> +LIBNDCTL_26 {
> +	ndctl_bus_nfit_translate_spa;
> +} LIBNDCTL_25;
> diff --git a/ndctl/lib/nfit.c b/ndctl/lib/nfit.c
> index 6f68fcf..d85682f 100644
> --- a/ndctl/lib/nfit.c
> +++ b/ndctl/lib/nfit.c
> @@ -114,7 +114,7 @@ static int is_valid_spa(struct ndctl_bus *bus, unsigned long long spa)
>   *
>   * If success, returns zero, store dimm's @handle, and @dpa.
>   */
> -int ndctl_bus_nfit_translate_spa(struct ndctl_bus *bus,
> +NDCTL_EXPORT int ndctl_bus_nfit_translate_spa(struct ndctl_bus *bus,
>  	unsigned long long address, unsigned int *handle, unsigned long long *dpa)
>  {
>  
> 
> 
> 
> diff --git a/ndctl/lib/private.h b/ndctl/lib/private.h
> index ede1300..8f4510e 100644
> --- a/ndctl/lib/private.h
> +++ b/ndctl/lib/private.h
> @@ -370,8 +370,6 @@ static inline int check_kmod(struct kmod_ctx *kmod_ctx)
>  	return kmod_ctx ? 0 : -ENXIO;
>  }
>  
> 
> 
> 
> -int ndctl_bus_nfit_translate_spa(struct ndctl_bus *bus, unsigned long long addr,
> -		unsigned int *handle, unsigned long long *dpa);
>  struct ndctl_cmd *ndctl_bus_cmd_new_err_inj(struct ndctl_bus *bus);
>  struct ndctl_cmd *ndctl_bus_cmd_new_err_inj_clr(struct ndctl_bus *bus);
>  struct ndctl_cmd *ndctl_bus_cmd_new_err_inj_stat(struct ndctl_bus *bus,
> diff --git a/ndctl/libndctl.h b/ndctl/libndctl.h
> index 60e1288..87d07b7 100644
> --- a/ndctl/libndctl.h
> +++ b/ndctl/libndctl.h
> @@ -152,6 +152,8 @@ int ndctl_bus_clear_fw_activate_noidle(struct ndctl_bus *bus);
>  int ndctl_bus_set_fw_activate_nosuspend(struct ndctl_bus *bus);
>  int ndctl_bus_clear_fw_activate_nosuspend(struct ndctl_bus *bus);
>  int ndctl_bus_activate_firmware(struct ndctl_bus *bus, enum ndctl_fwa_method method);
> +int ndctl_bus_nfit_translate_spa(struct ndctl_bus *bus, unsigned long long addr,
> +		unsigned int *handle, unsigned long long *dpa);
>  
> 
> 
> 
>  struct ndctl_dimm;
>  struct ndctl_dimm *ndctl_dimm_get_first(struct ndctl_bus *bus);

_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

      reply	other threads:[~2021-03-03 23:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 21:10 [ndctl PATCH v2] Expose ndctl_bus_nfit_translate_spa as a public function Tsaur, Erwin
2021-03-03 23:12 ` Verma, Vishal L [this message]

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=28b95b86506f9ecdd9ee7a6fc825dfc471d910b6.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=erwin.tsaur@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /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;
as well as URLs for NNTP newsgroup(s).