Haren Myneni
<haren@linux.ibm.com>unread,Mar 31, 2026, 12:38:40 AMMar 31Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
to powerpc-utils-devel@googlegroups.com, tyreld@linux.ibm.com, hbabu@us.ibm.com, Haren Myneni, Shirisha G, Sourabh Jain
The user space can request to remove or add memory based on
drc-index with the following command:
drmgr -c mem [-r/-a] -s <drc-name>
The current code ignores this option unlike in DLPAR CPU code. This
patch considers drc-index if the drc-name starts with "0x" and uses
this value to add /remove the corresponding LMB.
Signed-off-by: Haren Myneni <
ha...@linux.ibm.com>
Reported-by: Shirisha G <
shir...@linux.ibm.com>
Tested-by: Sourabh Jain <
soura...@linux.ibm.com>
---
src/drmgr/drslot_chrp_mem.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/drmgr/drslot_chrp_mem.c b/src/drmgr/drslot_chrp_mem.c
index d37ee80..55687a7 100644
--- a/src/drmgr/drslot_chrp_mem.c
+++ b/src/drmgr/drslot_chrp_mem.c
@@ -1815,8 +1815,12 @@ int drslot_chrp_mem(void)
/* The recursive nature of the routines that add/remove lmbs
* require that the quantity be non-zero.
*/
- if (usr_drc_name)
+ if (usr_drc_name) {
+ /* The -s option can specify a drc name or drc index */
+ if (!strncmp(usr_drc_name, "0x", 2))
+ usr_drc_index = strtoul(usr_drc_name, NULL, 16);
usr_drc_count = 1;
+ }
if (kernel_dlpar_exists()) {
rc = do_mem_kernel_dlpar();
--
2.50.1