sued by libndctl to read values of a specific NVDIMM performance
stat like "Life Remaining".
References
==
[1] Documentation/powerpc/papr_hcals.rst
[2]
https://lore.kernel.org/linux-nvdimm/20200508104922.72565-1-vaib...@linux.ibm.com/
[3] https://github.com/vaibhav92/ndctl/tree/p
length in two newly introduced NVDIMM
private struct members 'perf_stats' and 'len_stat_buffer'.
Signed-off-by: Vaibhav Jain
---
Documentation/ABI/testing/sysfs-bus-papr-scm | 27
arch/powerpc/platforms/pseries/papr_scm.c| 156 +++
2 files changed, 1
Hi Santosh,
Thanks for the updated patch. Minor review comment below:
Santosh Sivaraj writes:
> Subscribe to the MCE notification and add the physical address which
> generated a memory error to nvdimm bad range.
>
> Reviewed-by: Mahesh Salgaonkar
> Signed-off-by: Santosh Sivaraj
> ---
> arc
Michael Ellerman writes:
> Borislav Petkov writes:
>> On Fri, May 08, 2020 at 04:19:19PM +0530, Vaibhav Jain wrote:
>>> 'seq_buf' provides a very useful abstraction for writing to a string
>>> buffer without needing to worry about it over-flowing. However ev
Hi Boris,
Borislav Petkov writes:
> On Fri, May 08, 2020 at 05:30:31PM +0530, Vaibhav Jain wrote:
>> I am referring to Kernel Loadable Modules with MODULE_LICENSE("GPL")
>> here.
>
> And what does "external" refer to? Because if it is out-of-tree,
Hi Joe,
Joe Perches writes:
> On Fri, 2020-05-08 at 17:30 +0530, Vaibhav Jain wrote:
>> Hi Boris,
>>
>> Borislav Petkov writes:
>>
>> > On Fri, May 08, 2020 at 04:19:19PM +0530, Vaibhav Jain wrote:
>> > > 'seq_buf' provides a ver
Hi Boris,
Borislav Petkov writes:
> On Fri, May 08, 2020 at 04:19:19PM +0530, Vaibhav Jain wrote:
>> 'seq_buf' provides a very useful abstraction for writing to a string
>> buffer without needing to worry about it over-flowing. However even
>> though the API has
ruct nd_papr_pdsm_health' to cache the health
information of a nvdimm. As a result functions drc_pmem_query_health()
and flags_show() are updated to populate and use this new struct
instead of a u64 integer that was earlier used.
Cc: Dan Williams
Cc: Michael Ellerman
Cc: "Aneesh Kumar K .
Cc: Borislav Petkov
Signed-off-by: Vaibhav Jain
---
Changelog:
v6..v7:
* New patch in the series
---
lib/seq_buf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/seq_buf.c b/lib/seq_buf.c
index 4e865d42ab03..707453f5d58e 100644
--- a/lib/seq_buf.c
+++ b/lib/seq_buf.c
@@ -91,6 +91,7 @@ int s
from
papr_scm_ndctl() in case of a PDSM request is received via ND_CMD_CALL
command from libnvdimm.
Cc: Dan Williams
Cc: Michael Ellerman
Cc: "Aneesh Kumar K . V"
Signed-off-by: Vaibhav Jain
---
Changelog:
v6..v7 :
* Removed the re-definitions of __packed macro from papr_scm_pdsm.h
gs' is also introduced at
Documentation/ABI/testing/sysfs-bus-papr-scm.
[1] commit 58b278f568f0 ("powerpc: Provide initial documentation for
PAPR hcalls")
Cc: Dan Williams
Cc: Michael Ellerman
Cc: "Aneesh Kumar K . V"
Signed-off-by: Vaibhav Jain
---
Changelog:
v6..v7 :
* Used
s:
[1] "Power Architecture Platform Reference"
https://en.wikipedia.org/wiki/Power_Architecture_Platform_Reference
[2] commit 58b278f568f0
("powerpc: Provide initial documentation for PAPR hcalls")
[3] "Linux on Power Architecture Platform Reference"
https://m
Add documentation to 'papr_hcalls.rst' describing the bitmap flags
that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM
specification.
Cc: Dan Williams
Cc: Michael Ellerman
Cc: "Aneesh Kumar K . V"
Signed-off-by: Vaibhav Jain
---
Changelog:
v6..v7:
* None
v5..v
Thanks for looking into this patch Mpe,
Michael Ellerman writes:
> Vaibhav Jain writes:
>
>> Add documentation to 'papr_hcalls.rst' describing the bitmap flags
>> that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM
>> specification.
>>
>
Hi Mpe,
Thanks again for reviewing this patchset.
Michael Ellerman writes:
> Vaibhav Jain writes:
>> Introduce support for Papr nvDimm Specific Methods (PDSM) in papr_scm
>> modules and add the command family to the white list of NVDIMM command
>> sets. Also advertise su
-nvdimm/20200420070711.223545-1-vaib...@linux.ibm.com
Thanks,
~ Vaibhav Jain
Dan Williams writes:
> On Tue, Mar 31, 2020 at 7:33 AM Vaibhav Jain wrote:
>>
>> This patch implements support for papr_scm command
>> 'DSM_PAPR_SCM_HEALTH' that ret
ruct nd_papr_pdsm_health' to cache the health
information of a nvdimm. As a result functions drc_pmem_query_health()
and flags_show() are updated to populate and use this new struct
instead of a u64 integer that was earlier used.
Cc: Dan Williams
Cc: Michael Ellerman
Cc: "Aneesh Kumar K .
from
papr_scm_ndctl() in case of a PDSM request is received via ND_CMD_CALL
command from libnvdimm.
Cc: Dan Williams
Cc: Michael Ellerman
Cc: "Aneesh Kumar K . V"
Signed-off-by: Vaibhav Jain
---
Changelog
v5..v6 :
* Changed the usage of the term DSM to PDSM to distinguish it from
Add documentation to 'papr_hcalls.rst' describing the bitmap flags
that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM
specification.
Cc: Dan Williams
Cc: Michael Ellerman
Cc: "Aneesh Kumar K . V"
Signed-off-by: Vaibhav Jain
---
Changelog:
v5..v6
* New
documentation text
describing flags reported by the the new sysfs attribute 'papr/flags'
is also introduced at Documentation/ABI/testing/sysfs-bus-papr-scm.
[1] commit 58b278f568f0 ("powerpc: Provide initial documentation for
PAPR hcalls")
Cc: Dan Williams
Cc: Michael Ellerman
rsion of the structure is
currently in existence.
References:
[1] "Power Architecture Platform Reference"
https://en.wikipedia.org/wiki/Power_Architecture_Platform_Reference
[2] commit 58b278f568f0
("powerpc: Provide initial documentation for PAPR hcalls")
[3] "Linux o
river papr_scm_driver = {
> },
> };
>
> -module_platform_driver(papr_scm_driver);
> +static int __init papr_scm_init(void)
> +{
> + int ret;
> +
> + ret = platform_driver_register(&papr_scm_driver);
> + if (!ret)
> + mce_register_notifier(&mce_ue_nb);
> +
> + return ret;
> +}
> +module_init(papr_scm_init);
> +
> +static void __exit papr_scm_exit(void)
> +{
> + mce_unregister_notifier(&mce_ue_nb);
> + platform_driver_unregister(&papr_scm_driver);
> +}
> +module_exit(papr_scm_exit);
> +
> MODULE_DEVICE_TABLE(of, papr_scm_match);
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("IBM Corporation");
> --
> 2.25.1
>
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
;
> Since the persistent memory is still backed with page structs,
> use MAX_PHYSMEM_BITS as the upper limit.
>
> This effectively disables huge DMA window in LPAR under pHyp if
> persistent memory is present but this is the best we can do.
>
> Signed-off-by: Alexey Kardashevskiy
T
y tests on them. In case of a DSM command being sent via
ND_CMD_CALL a newly introduced function papr_scm_service_dsm() is
called to handle the request.
Signed-off-by: Vaibhav Jain
---
Changelog:
v4..v5: Fixed a bug in new implementation of papr_scm_ndctl().
v3..v4: Updated papr_scm_ndctl() to
ealth' thats an instance of 'struct
nd_papr_scm_dimm_health_stat' to cache the health information of a
scm-dimm. As a result functions drc_pmem_query_health() and
papr_flags_show() are updated to populate and use this new struct
instead of two be64 integers that we earlier used.
Signed-off-by: Vaibha
Add PAPR-scm family of DSM command-set to the white list of NVDIMM
command sets.
Signed-off-by: Vaibhav Jain
---
Changelog:
v4..v5 : None
v3..v4 : None
v2..v3 : Updated the patch prefix to 'ndctl/uapi' [Aneesh]
v1..v2 : None
---
include/uapi/linux/ndctl.h | 1 +
1 file changed, 1
t 58b278f568f0
("powerpc: Provide initial documentation for PAPR hcalls")
[3]: "Linux on Power Architecture Platform Reference"
https://members.openpowerfoundation.org/document/dl/469
[4]: https://patchwork.kernel.org/project/linux-nvdimm/list/?series=244625
Vaibhav Jai
dimm have been
scrubbed.
* "locked" : Indicating that nvdimm contents cant be modified
until next power cycle.
[1]: commit 58b278f568f0 ("powerpc: Provide initial documentation for
PAPR hcalls")
Signed-off-by: Vaibhav Jain
---
Changelog:
v4..v5 : None
v
ealth' thats an instance of 'struct
nd_papr_scm_dimm_health_stat' to cache the health information of a
scm-dimm. As a result functions drc_pmem_query_health() and
papr_flags_show() are updated to populate and use this new struct
instead of two be64 integers that we earlier used.
Signed-off-
y tests on them. In case of a DSM command being sent via
ND_CMD_CALL a newly introduced function papr_scm_service_dsm() is
called to handle the request.
Signed-off-by: Vaibhav Jain
---
Changelog:
v3..v4: Updated papr_scm_ndctl() to delegate DSM command handling to a
different functio
Add PAPR-scm family of DSM command-set to the white list of NVDIMM
command sets.
Signed-off-by: Vaibhav Jain
---
Changelog:
v3..v4 : None
v2..v3 : Updated the patch prefix to 'ndctl/uapi' [Aneesh]
v1..v2 : None
---
include/uapi/linux/ndctl.h | 1 +
1 file changed, 1 insertion(+)
dimm have been
scrubbed.
* "locked" : Indicating that nvdimm contents cant be modified
until next power cycle.
[1]: commit 58b278f568f0 ("powerpc: Provide initial documentation for
PAPR hcalls")
Signed-off-by: Vaibhav Jain
---
Changelog:
v3..v4 : None
structure is
currently in existence.
References:
[1]: "Power Architecture Platform Reference"
https://en.wikipedia.org/wiki/Power_Architecture_Platform_Reference
[2]: commit 58b278f568f0
("powerpc: Provide initial documentation for PAPR hcalls")
[3]: "Linux on Power A
ealth' thats an instance of 'struct
nd_papr_scm_dimm_health_stat' to cache the health information of a
scm-dimm. As a result functions drc_pmem_query_health() and
papr_flags_show() are updated to populate and use this new struct
instead of two be64 integers that we earlier used.
Signed-off-by: Vai
reads
the args to papr_scm_ndctl() , performs sanity tests on them and
converts them to PAPR DSM commands which can then be handled via the
switch-case block.
Signed-off-by: Vaibhav Jain
---
Changelog:
v2..v3: Updated the nd_papr_scm_cmd_pkg to use __xx types as its
exported to the userspa
Add PAPR-scm family of DSM command-set to the white list of NVDIMM
command sets.
Signed-off-by: Vaibhav Jain
---
Changelog:
v2..v3 : Updated the patch prefix to 'ndctl/uapi' [Aneesh]
v1..v2 : None
---
include/uapi/linux/ndctl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/in
dimm have been
scrubbed.
* "locked" : Indicating that nvdimm contents cant be modified
until next power cycle.
[1]: commit 58b278f568f0 ("powerpc: Provide initial documentation for
PAPR hcalls")
Signed-off-by: Vaibhav Jain
---
Change-log:
v2..v3 : Remove
atform_Reference
[2]: commit 58b278f568f0
("powerpc: Provide initial documentation for PAPR hcalls")
[3]: "Linux on Power Architecture Platform Reference"
https://members.openpowerfoundation.org/document/dl/469
[4]: https://patchwork.kernel.org/project/linux-nvdimm/list
ealth' thats an instance of 'struct
nd_papr_scm_dimm_health_stat' to cache the health information of a
scm-dimm. As a result functions drc_pmem_query_health() and
papr_flags_show() are updated to populate and use this new struct
instead of two be64 integers that we earlier used.
Signed-off-by
ce
[2]: commit 58b278f568f0
("powerpc: Provide initial documentation for PAPR hcalls")
[3]: "Linux on Power Architecture Platform Reference"
https://members.openpowerfoundation.org/document/dl/469
[4]: https://patchwork.kernel.org/project/linux-nvdimm/list/?series=2
Add PAPR-scm family of DSM command-set to the white list of NVDIMM
command sets.
Signed-off-by: Vaibhav Jain
---
include/uapi/linux/ndctl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index de5d90212409..99fb60600ef8 100644
--- a
dimm have been
scrubbed.
* "locked" : Indicating that nvdimm contents cant be modified
until next power cycle.
[1]: commit 58b278f568f0 ("powerpc: Provide initial documentation for
PAPR hcalls")
Signed-off-by: Vaibhav Jain
---
arch/powerpc/include/a
reads
the args to papr_scm_ndctl() , performs sanity tests on them and
converts them to PAPR DSM commands which can then be handled via the
switch-case block.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/include/uapi/asm/papr_scm_dsm.h | 161 +++
arch/powerpc/platforms/pseries/
DW always
'No' : Force enable DDW even if Pmem nodes present in device-tree
Signed-off-by: Vaibhav Jain
---
.../admin-guide/kernel-parameters.txt | 10 ++-
arch/powerpc/platforms/pseries/iommu.c| 67 +--
2 files changed, 70 insertions(+), 7 deletions(-)
attributes.
2. If an entity (libndctl or papr_scm) supports a DSM struct T(X) then
it should also support T(1), T(2)...T(X - 1).
i.e When adding support for new version of a DSM struct, libndctl
and papr_scm should retain support of the existing DSM struct
version they support.
Signed-
ntain appropriate version
information in 'struct nd_papr_scm_cmd_pkg.payload_version'. The patch
takes care of only returning the sub-data corresponding to the payload
version requested. Please see the comments in papr_scm_get_health()
for how this is done.
Signed-off-by: Vaibhav Jain
-
e flags in 'struct papr_scm_priv.health' to return
appropriate status strings pertaining to dimm health.
This patch shouldn't introduce any behavioral change.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 61 ---
1 file changed, 44 insertions
) , performs sanity tests on them and
converts them to PAPR DSM commands which can then be handled via the
switch-case block.
Signed-off-by: Vaibhav Jain
---
Change-log:
* Added a 'reserved' field in 'struct nd_pkg_papr_scm' to ensure
'payload' falls on a 8-Byte a
Add PAPR-scm family of DSM command-set to the white list of NVDIMM
command sets.
Signed-off-by: Vaibhav Jain
---
include/uapi/linux/ndctl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index de5d90212409..99fb60600ef8 100644
--- a
278f568f0 ("powerpc: Provide initial documentation for
PAPR hcalls")
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 107 ++
1 file changed, 107 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c
b/arch/powerpc/platform
e is health event for the nvdimm.
* "scrubbed": Indicating that contents of the nvdimm have been
scrubbed.
* "locked" : Indicating that nvdimm contents cant be modified
until next power cycle.
[1]: commit 58b278f568f0 ("powerpc
tween PHYP and kernel during those HCALLs.
Future patches will use these structures to provide support for
retriving nvdimm health and performance stats in papr_scm kernel
module.
[1]: commit 58b278f568f0 ("powerpc: Provide initial documentation for
PAPR hcalls")
Signed-off-by: Vai
s.org/patch/1154292/
[3]: "Linux on Power Architecture Platform Reference"
https://members.openpowerfoundation.org/document/dl/469
[4]: https://github.com/vaibhav92/ndctl/tree/papr_scm_health_v1
[5]:
https://lore.kernel.org/linuxppc-dev/20200129152844.71286-1-vaib...@linux.ibm.c
Function papr_scm_ndctl() is neither exported from the module nor
called directly from outside 'papr.c' hence should be marked 'static'.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-
tion and then
copies PHYP provided buffer that holds these stat attributes to the
package payload whose layout is defined by 'struct
papr_scm_perf_stats'
References:
[1]: https://patchwork.ozlabs.org/patch/1154292/
[2]: https://github.com/pmem/ndctl
Signed-off-by: Vaibhav Jain
hen copies these bitmaps to the package payload whose layout is
defined by 'struct papr_scm_ndctl_health'.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 46 +++
1 file changed, 46 insertions(+)
diff --git a/arch/powerpc/platforms/pserie
) , performs sanity tests on them and
converts them to PAPR DSM commands which can then be handled via the
switch-case block.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 96 +--
1 file changed, 89 insertions(+), 7 deletions(-)
diff --git
Add PAPR-scm family of DSM command-set to to the white list of NVDIMM
command sets.
Signed-off-by: Vaibhav Jain
---
include/uapi/linux/ndctl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index de5d90212409..0e09dc5cec19 100644
#x27; buffer
'stats'.
References:
[1]: https://patchwork.ozlabs.org/patch/1154292/
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 56 +++
1 file changed, 56 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c
b/arch/
27;.
References:
[1]: https://patchwork.ozlabs.org/patch/1154292/
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 65 ++-
1 file changed, 63 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c
b/arch/powerpc/platform
ower Architecture Platform Reference"
https://en.wikipedia.org/wiki/Power_Architecture_Platform_Reference
[2]: "[DOC,v2] powerpc: Provide initial documentation for PAPR hcalls"
https://patchwork.ozlabs.org/patch/1154292/
[3]: "Linux on Power Architecture Platform Re
robe() as well as in
of_pmem_region_remove().
Cc: sta...@vger.kernel.org
Fixes:49bddc73d15c2("libnvdimm/of_pmem: Provide a unique name for bus provider")
Signed-off-by: Vaibhav Jain
---
drivers/nvdimm/of_pmem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nvdimm/of_pmem.c b/
lue of out
variable 'cmd_rc' back to user-space in case it reports an error.
Signed-off-by: Vaibhav Jain
---
drivers/nvdimm/bus.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index a8b515968569..5b687a27fdf2 100644
--- a/drivers/nvdimm
s in papr_scm_remove().
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c
b/arch/powerpc/platforms/pseries/papr_scm.c
index c2ef320ba1bf..eb420655ed0b 100644
--- a/arch/power
gt; .of_match_table = papr_scm_match,
> },
> };
> --
> 2.23.0
>
LGTM
Acked-by: Vaibhav Jain
Thanks,
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
error -22
The patch fixes these validation checks there by letting libnvdimm
access the entire config-area.
Fixes: 53e80bd042773('powerpc/nvdimm: Add support for multibyte read/write for
metadata')
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/pseries/papr_scm.c | 4 ++--
1 fi
get_config_data_hdr *hdr)
> {
> @@ -430,13 +464,11 @@ static int papr_scm_probe(struct platform_device *pdev)
> rc = drc_pmem_bind(p);
>
> /* If phyp says drc memory still bound then force unbound and retry */
> - if (rc == H_OVERLAP) {
> - dev_warn(&pdev->dev, "Retrying bind after unbinding\n");
> - drc_pmem_unbind(p);
> - rc = drc_pmem_bind(p);
> - }
> + if (rc == H_OVERLAP)
> + rc = drc_pmem_query_n_bind(p);
>
> if (rc != H_SUCCESS) {
> + dev_err(&p->pdev->dev, "bind err: %d\n", rc);
> rc = -ENXIO;
> goto err;
> }
> --
> 2.21.0
>
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
rc = drc_pmem_bind(p);
>
> /* If phyp says drc memory still bound then force unbound and retry */
> - if (rc == -EBUSY) {
> + if (rc == H_OVERLAP) {
> dev_warn(&pdev->dev, "Retrying bind after unbinding\n");
> drc_pmem_unbind(p);
> rc = drc_pmem_bind(p);
> }
>
> - if (rc)
> + if (rc != H_SUCCESS) {
> + rc = -ENXIO;
> goto err;
> + }
>
> /* setup the resource for the newly bound range */
> p->res.start = p->bound_addr;
> --
> 2.21.0
>
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
, how they are issued with the
Linux kernel and how information/control flows between the guest and
hypervisor.
Signed-off-by: Vaibhav Jain
---
Change-log:
v2:
* Added a section on Register conventions to be followed when invoking
hcalls. [Nick]
* Updated section on HCALL ABI to clarify that
, how they are issued with the
Linux kernel and how information/control flows between the guest and
hypervisor.
Signed-off-by: Vaibhav Jain
---
Change-log:
Initial version of this doc-patch was posted and reviewed as part of
the patch-series "[PATCH v5 0/4] powerpc/papr_scm: Workaroun
strdup(pdev->name, GFP_KERNEL);
> priv->bus_desc.module = THIS_MODULE;
> priv->bus_desc.of_node = np;
>
> --
> 2.21.0
>
Tested-by: Vaibhav Jain
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
Thanks everyone for reviewing this patch-set. The V4 got merged upstream which
didn't have this DOC-patch. So, I will re-spin a separate and independent
doc-patch incorporating your review comments.
Cheers,
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
error returned by phyp
and indicate it as a EBUSY error back to the caller.
Suggested-by: "Oliver O'Halloran"
Signed-off-by: Vaibhav Jain
Reviewed-by: Oliver O'Halloran
---
Change-log:
v5:
* None. Re-spinning the patchset.
v4:
* None. Re-spinning the patchset.
v3:
* Minor update t
.
* Ensure appropriate error code is returned back from the function
in case of an error.
Reviewed-by: Oliver O'Halloran
Signed-off-by: Vaibhav Jain
---
Change-log:
v5:
* None. Re-spinning the patchset.
v4:
* None. Re-spinning the patchset.
v3:
* Fixed a build warning repo
implemented by
Power-VM nor they were used anywhere in Linux kernel. Hence we don't
expect anyone to be impacted by this change.
Signed-off-by: Vaibhav Jain
---
Change-log:
v5:
* None. Re-spinning the patchset.
v4:
* Updated the patch description mentioned current status of removed
hcall opcodes.
of how Hcalls are implemented inside the Linux
kernel and how information flows between kernel and PowerVM/KVM.
Signed-off-by: Vaibhav Jain
---
Change-log:
v5
* First patch in this patchset.
---
Documentation/powerpc/hcalls.txt | 140 +++
1 file changed, 140
sted
by Mpe.
v3:
* Fixed a build warning reported by kbuild test robot.
* Updated the hcall opcode from latest papr-scm specification.
* Fixed a minor code comment & patch description as pointed out by Oliver.
v2:
* Addressed review comments from Oliver on v1 patchset.
Vaibhav Jain (4):
power
Thanks for reviewing this patch Mpe.
Michael Ellerman writes:
> "Oliver O'Halloran" writes:
>> On Fri, Jun 28, 2019 at 1:39 PM Michael Ellerman wrote:
>>>
>>> Vaibhav Jain writes:
>>> > *snip*
>>>
>>> How can we be
error returned by phyp
and indicate it as a EBUSY error back to the caller.
Suggested-by: "Oliver O'Halloran"
Signed-off-by: Vaibhav Jain
Reviewed-by: Oliver O'Halloran
---
Change-log:
v4:
* None. Re-spinning the patchset.
v3:
* Minor update to a code comment. [Oliver]
v2:
*
.
* Ensure appropriate error code is returned back from the function
in case of an error.
Reviewed-by: Oliver O'Halloran
Signed-off-by: Vaibhav Jain
---
Change-log:
v4:
* None. Re-spinning the patchset.
v3:
* Fixed a build warning reported by kbuild-robot.
* Updated patch descriptio
implemented by
Power-VM nor they were used anywhere in Linux kernel. Hence we don't
expect anyone to be impacted by this change.
Signed-off-by: Vaibhav Jain
---
Change-log:
v4:
* Updated the patch description mentioned current status of removed
hcall opcodes. [Mpe]
v3:
* Added updated opcod
on.
* Fixed a minor code comment & patch description as pointed out by Oliver.
v2:
* Addressed review comments from Oliver on v1 patchset.
Vaibhav Jain (3):
powerpc/pseries: Update SCM hcall op-codes in hvcall.h
powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL
powerpc/pa
t hot_add_scn_to_nid(unsigned long scn_addr)
> struct device_node *memory = NULL;
> int nid;
>
> - if (!numa_enabled || (min_common_depth < 0))
> + if (min_common_depth < 0)
> return first_online_node;
>
> memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
> --
> 2.21.0
>
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
Thanks for reviewing this patch Aneesh,
"Aneesh Kumar K.V" writes:
> On 6/26/19 7:34 PM, Vaibhav Jain wrote:
>> The new hcall named H_SCM_UNBIND_ALL has been introduce that can
>> unbind all or specific scm memory assigned to an lpar. This is
>> more efficient
error returned by phyp
and indicate it as a EBUSY error back to the caller.
Suggested-by: "Oliver O'Halloran"
Signed-off-by: Vaibhav Jain
Reviewed-by: Oliver O'Halloran
---
Change-log:
v3:
* Minor update to a code comment. [Oliver]
v2:
* Moved the retry code from drc_pmem
Update the hvcalls.h to include op-codes for new hcalls introduce to
manage SCM memory. Also update existing hcall definitions to reflect
current papr specification for SCM.
Signed-off-by: Vaibhav Jain
---
Change-log:
v3:
* Added updated opcode for H_SCM_HEALTH [Oliver]
v2:
* None new patch in
.
* Ensure appropriate error code is returned back from the function
in case of an error.
Reviewed-by: Oliver O'Halloran
Signed-off-by: Vaibhav Jain
---
Change-log:
v3:
* Fixed a build warning reported by kbuild-robot.
* Updated patch description to put emphasis on 'scm memo
tl list -R
[
{
"dev":"region0",
}
]
---
Change-log:
v3:
* Fixed a build warning reported by kbuild test robot.
* Updated the hcall opcode from latest papr-scm specification.
* Fixed a minor code comment & patch description as pointed out by Oliver.
v2:
* Add
error returned by phyp
and indicate it as a EBUSY error back to the caller.
Suggested-by: "Oliver O'Halloran"
Signed-off-by: Vaibhav Jain
---
Change-log:
v2:
* Moved the retry code from drc_pmem_bind() to papr_scm_probe()
[Oliver]
* Changed the type of variable 'rc' in drc_pme
7; return value.
* Ensure appropriate error code is returned back from the function
in case of an error.
Signed-off-by: Vaibhav Jain
---
Change-log:
v2:
* Added a dev_dbg when unbind operation succeeds [Oliver]
* Changed type of variable 'rc' to int64_t [Oliver]
* Removed the code that
tl list -R
[
{
"dev":"region0",
}
]
---
Change-log:
v2:
* Addressed review comments from Oliver on v1 patchset.
Vaibhav Jain (3):
powerpc/pseries: Update SCM hcall op-codes in hvcall.h
powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL
p
Update the hvcalls.h to include op-codes for new hcalls introduce to
manage SCM memory. Also update existing hcall definitions to reflect
current papr specification for SCM.
Signed-off-by: Vaibhav Jain
---
Change-log:
v2:
* None new patch in this series.
---
arch/powerpc/include/asm/hvcall.h
patch updates drc_pmem_bind() to force a
call to drc_pmem_unbind() in case the initial bind of scm memory fails
with H_OVERLAP error. In case scm-bind operation again fails after the
forced scm-unbind then we follow the existing error path.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/platforms/ps
t;dev":"region0",
}
]
# kexec to new kernel
$ sudo kexec --initrd=... vmlinux
...
...
I'm in purgatory
...
papr_scm ibm,persistent-memory:ibm,pmemory@4412: Un-binding and retrying
...
# New kernel
$ sudo ndctl list -R
$ sudo ndctl list -R
[
{
"dev":"region0&q
eturn value. In case it takes more
than 1 second to unbind the memory log a warning.
* Ensure appropriate error code is returned back from the function
in case of an error.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/include/asm/hvcall.h | 2 +-
arch/powerpc/platforms/pse
Michael Ellerman writes:
> Vaibhav Jain writes:
>> We recently discovered an bug where physical memory meant for
>> allocation of Huge-pages was inadvertently allocated by another component
>> during early boot.
>
> Can you give me some more detail on what that was?
the
the kernel to ensure that user of this huge-page doesn't accidentally
stomp on memory allocated to someone else.
Signed-off-by: Vaibhav Jain
---
arch/powerpc/mm/book3s64/hash_utils.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c
b/arch/po
daxio: copied 2130706432 bytes to device "/dev/dax0.0"
Hence,
Tested-by: Vaibhav Jain
"Aneesh Kumar K.V" writes:
> Allow arch to provide the supported alignments and use hugepage alignment only
> if we support hugepage. Right now we depend on compile tim
perfectly valid reason for a new version of the patch.
Thanks for pointing this out. Will take care of this in future.
>
> I've applied it, no need to RESEND ;)
Thanks.
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
fore calling cxlflash_remove().
Cc: sta...@vger.kernel.org
Fixes: c21e0bbfc485("cxlflash: Base support for IBM CXL Flash Adapter")
Signed-off-by: Vaibhav Jain
---
drivers/scsi/cxlflash/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi
201 - 300 of 492 matches
Mail list logo