From: Laurent Dufour <ldufour@linux.ibm.com>
To: mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] Consider the size of the added CPU nodes in the kexec FDT
Date: Thu, 10 Nov 2022 19:06:17 +0100 [thread overview]
Message-ID: <20221110180619.15796-1-ldufour@linux.ibm.com> (raw)
When adding CPUs to an already big system (test show it seems to start with
more than 256 CPUs), the kernel is showing error messages when building the
FDT for the kexec kernel (kdump or kexec).
It's worth to mention that the kdump kernel is reloaded after a CPU add
operation.
The messages look like (property's name may vary):
10175.025675] Unable to add 32-64-bridge property: FDT_ERR_NOSPACE
This happens because the size of the FDT is computed based on the size of
the FDT the kernel received at boot time. There is additional space added
in kexec_extra_fdt_size_ppc64() for the added memory but nothing is done
for the added CPUs.
This patch adds this feature so adding new CPUs will increase the size of
the FDT for the kexec kernel.
To compute the additional size required, the number of CPU nodes of the
initial FDT (the one the kernel receive at boot time) are recorded. When a
kexec FDT is created, the number of CPU nodes in the current FDT is used to
compute the additional size.
The first patch of this series is creating a variable provided by the boot
code when parsing the initial FDT at boot time.
The second patch is computing the required additional space.
This has been tested on a PowerVM LPAR running with than 256 CPUs in shared
mode, adding 320 CPUs to this LPAR.
Changes in v2:
- Fix build issue, moving definition in prom.h
Laurent Dufour (2):
powerpc: export the CPU node count
powerpc: Take in account addition CPU node when building kexec FDT
arch/powerpc/include/asm/prom.h | 1 +
arch/powerpc/kernel/prom.c | 3 ++
arch/powerpc/kexec/file_load_64.c | 60 ++++++++++++++++++++++++++++++-
3 files changed, 63 insertions(+), 1 deletion(-)
--
2.38.1
next reply other threads:[~2022-11-10 18:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 18:06 Laurent Dufour [this message]
2022-11-10 18:06 ` [PATCH v2 1/2] powerpc: export the CPU node count Laurent Dufour
2022-11-10 18:06 ` [PATCH v2 2/2] powerpc: Take in account addition CPU node when building kexec FDT Laurent Dufour
2022-12-08 12:40 ` [PATCH v2 0/2] Consider the size of the added CPU nodes in the " 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=20221110180619.15796-1-ldufour@linux.ibm.com \
--to=ldufour@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--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).