Expose ndctl_bus_nfit_translate_spa as a public function.
PATCH v2 1/1 Expose ndctl_bus_nfit_translate_spa as a public function.
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.
--- 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(-)
ndctl/lib/libndctl.sym +4 -0
@@ -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;
ndctl/lib/nfit.c +1 -1
@@ -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) {
ndctl/lib/private.h +0 -2
@@ -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,
ndctl/libndctl.h +2 -0
@@ -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);
Signature · 4 lines
2.30.0 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
Verma, Vishal L
maintainerQuoted 4 lines · Erwin
The motivation is to allow access to ACPI defined NVDIMM Root Device
_DSMFunction Index 5(Translate SPA). The rest of the_DSMfunctions, which are mostly ARS related, are already public.
Quoted 8 lines
Basically move
ndctl_bus_nfit_translate_spadeclaration fromprivate.htolibndctl.h.Changes from V1:
- Group function declaration inlibndctl.hwith other ndctl_bus_* functions.Reviewed-by Dan Williams <[email protected]>Reviewed-by Verma, Vishal L <[email protected]>
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>"
Quoted 65 lines
---
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(-)ndctl/lib/libndctl.sym +4
-0@@ -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;ndctl/lib/nfit.c +1
-1@@ -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) {ndctl/lib/private.h +0
-0@@ -370,8 +370,6 @@ static inline int check_kmod(struct kmod_ctx *kmod_ctx) return kmod_ctx ? 0 : -ENXIO; }ndctl/lib/private.h +0
-2-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(structndctl_bus*bus); structndctl_cmd*ndctl_bus_cmd_new_err_inj_clr(structndctl_bus*bus); structndctl_cmd*ndctl_bus_cmd_new_err_inj_stat(structndctl_bus*bus,ndctl/libndctl.h +2
-0@@ -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);
Quoted 2 lines
struct
ndctl_dimm;
structndctl_dimm*ndctl_dimm_get_first(structndctl_bus*bus);
_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]