From: Shivang Upadhyay <shivangu@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
chleroy@kernel.org, sourabhjain@linux.ibm.com,
adri.vero.dev@gmail.com, adityag@linux.ibm.com,
anushree.mathur@linux.vnet.ibm.com,
Shivang Upadhyay <shivangu@linux.ibm.com>
Subject: [PATCH] ppc/fadump: collect dump if the collected size is lesser than reserved
Date: Tue, 14 Jul 2026 23:00:10 +0530 [thread overview]
Message-ID: <20260714173010.615682-1-shivangu@linux.ibm.com> (raw)
When a machine is subjected to CPUs add/remove, using dlpar
operations, the number of collected CPU_NOTES can change.
As per PAPR, collected dump size should not be more than
allocated size. Reflecting the same in source.
Signed-off-by: Shivang Upadhyay <shivangu@linux.ibm.com>
---
arch/powerpc/platforms/pseries/rtas-fadump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/rtas-fadump.c b/arch/powerpc/platforms/pseries/rtas-fadump.c
index 3bb4ac2ab6cc..19a5adaf326b 100644
--- a/arch/powerpc/platforms/pseries/rtas-fadump.c
+++ b/arch/powerpc/platforms/pseries/rtas-fadump.c
@@ -469,7 +469,8 @@ static int __init rtas_fadump_process(struct fw_dump *fadump_conf)
pr_err("Dump taken by platform is not valid (%d)\n", i);
rc = -EINVAL;
}
- if (fdm_active->rgn[i].bytes_dumped != fdm_active->rgn[i].source_len) {
+ if (be64_to_cpu(fdm_active->rgn[i].bytes_dumped)
+ > be64_to_cpu(fdm_active->rgn[i].source_len)) {
pr_err("Dump taken by platform is incomplete (%d)\n", i);
rc = -EINVAL;
}
--
2.54.0
next reply other threads:[~2026-07-14 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 17:30 Shivang Upadhyay [this message]
2026-07-19 7:09 ` [PATCH] ppc/fadump: collect dump if the collected size is lesser than reserved Sourabh Jain
2026-07-22 9:11 ` Shivang Upadhyay
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=20260714173010.615682-1-shivangu@linux.ibm.com \
--to=shivangu@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=adri.vero.dev@gmail.com \
--cc=anushree.mathur@linux.vnet.ibm.com \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=sourabhjain@linux.ibm.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