From: Nathan Lynch via B4 Relay <devnull+nathanl.linux.ibm.com@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>
Cc: Nathan Lynch <nathanl@linux.ibm.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
Nick Child <nnac123@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org,
Scott Cheloha <cheloha@linux.ibm.com>
Subject: [PATCH 3/3] powerpc/pseries/memhp: Log more error conditions in add path
Date: Tue, 14 Nov 2023 11:01:55 -0600 [thread overview]
Message-ID: <20231114-pseries-memhp-fixes-v1-3-fb8f2bb7c557@linux.ibm.com> (raw)
In-Reply-To: <20231114-pseries-memhp-fixes-v1-0-fb8f2bb7c557@linux.ibm.com>
From: Nathan Lynch <nathanl@linux.ibm.com>
When an add operation for multiple LMBs fails, there is currently
little indication from the kernel of what went wrong. Be a little more
verbose about error conditions in the add paths.
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
---
arch/powerpc/platforms/pseries/hotplug-memory.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index ba883c1b9f6d..4896920514f3 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -208,8 +208,10 @@ static int dlpar_change_lmb_state(struct drmem_lmb *lmb, bool online)
int rc;
mem_block = lmb_to_memblock(lmb);
- if (!mem_block)
+ if (!mem_block) {
+ pr_err("Failed memory block lookup for LMB 0x%x\n", lmb->drc_index);
return -EINVAL;
+ }
if (online && mem_block->dev.offline)
rc = device_online(&mem_block->dev);
@@ -575,6 +577,7 @@ static int dlpar_add_lmb(struct drmem_lmb *lmb)
rc = update_lmb_associativity_index(lmb);
if (rc) {
+ pr_err("Failed to configure LMB 0x%x\n", lmb->drc_index);
return rc;
}
@@ -588,12 +591,14 @@ static int dlpar_add_lmb(struct drmem_lmb *lmb)
/* Add the memory */
rc = __add_memory(nid, lmb->base_addr, block_sz, MHP_MEMMAP_ON_MEMORY);
if (rc) {
+ pr_err("Failed to add LMB 0x%x to node %u", lmb->drc_index, nid);
invalidate_lmb_associativity_index(lmb);
return rc;
}
rc = dlpar_online_lmb(lmb);
if (rc) {
+ pr_err("Failed to online LMB 0x%x on node %u\n", lmb->drc_index, nid);
__remove_memory(lmb->base_addr, block_sz);
invalidate_lmb_associativity_index(lmb);
} else {
--
2.41.0
next prev parent reply other threads:[~2023-11-14 17:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 17:01 [PATCH 0/3] powerpc/pseries/memhp: Fix minor bugs and improve error logging Nathan Lynch via B4 Relay
2023-11-14 17:01 ` [PATCH 1/3] powerpc/pseries/memhp: Fix access beyond end of drmem array Nathan Lynch via B4 Relay
2023-11-14 17:01 ` [PATCH 2/3] powerpc/pseries/memhp: Remove unbalanced dlpar_release_drc() call Nathan Lynch via B4 Relay
2023-11-15 17:31 ` Nick Child
2023-11-28 14:21 ` Nathan Lynch
2023-11-30 20:09 ` Scott Cheloha
2023-11-14 17:01 ` Nathan Lynch via B4 Relay [this message]
2023-12-07 12:38 ` [PATCH 0/3] powerpc/pseries/memhp: Fix minor bugs and improve error logging Michael Ellerman
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=20231114-pseries-memhp-fixes-v1-3-fb8f2bb7c557@linux.ibm.com \
--to=devnull+nathanl.linux.ibm.com@kernel.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=cheloha@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nathanl@linux.ibm.com \
--cc=nnac123@linux.ibm.com \
--cc=npiggin@gmail.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 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).