From: Thomas Huth <thuth@redhat.com>
To: Harsh Prateek Bora <harshpb@linux.ibm.com>, qemu-ppc@nongnu.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
Amit Machhiwal <amachhiw@linux.ibm.com>,
qemu-devel@nongnu.org
Subject: [PATCH 2/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.1 machine
Date: Tue, 1 Dec 2026 08:55:35 +0100 [thread overview]
Message-ID: <20261201075536.40736-3-thuth@redhat.com> (raw)
In-Reply-To: <20261201075536.40736-1-thuth@redhat.com>
The pseries-5.1 machine has already been disabled automatically
since it is older than 6 years. Remove this dead code now,
together with the now unused "pre_5_2_numa_associativity" parts.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/hw/ppc/spapr.h | 1 -
hw/ppc/spapr.c | 14 --------------
hw/ppc/spapr_numa.c | 33 ++-------------------------------
3 files changed, 2 insertions(+), 46 deletions(-)
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 4db3a267bac..175aa8320c0 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -143,7 +143,6 @@ struct SpaprCapabilities {
struct SpaprMachineClass {
MachineClass parent_class;
- bool pre_5_2_numa_associativity;
bool pre_6_2_numa_affinity;
SpaprResizeHpt resize_hpt_default;
SpaprCapabilities default_caps;
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 2c203622657..635276af531 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4985,20 +4985,6 @@ static void spapr_machine_5_2_class_options(MachineClass *mc)
DEFINE_SPAPR_MACHINE(5, 2);
-/*
- * pseries-5.1
- */
-static void spapr_machine_5_1_class_options(MachineClass *mc)
-{
- SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
-
- spapr_machine_5_2_class_options(mc);
- compat_props_add(mc->compat_props, hw_compat_5_1, hw_compat_5_1_len);
- smc->pre_5_2_numa_associativity = true;
-}
-
-DEFINE_SPAPR_MACHINE(5, 1);
-
static void spapr_machine_register_types(void)
{
type_register_static(&spapr_machine_info);
diff --git a/hw/ppc/spapr_numa.c b/hw/ppc/spapr_numa.c
index faa35f12275..fb47f3c7368 100644
--- a/hw/ppc/spapr_numa.c
+++ b/hw/ppc/spapr_numa.c
@@ -261,7 +261,6 @@ static void spapr_numa_FORM1_affinity_check(MachineState *machine)
static void spapr_numa_FORM1_affinity_init(SpaprMachineState *spapr,
MachineState *machine)
{
- SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
int nb_numa_nodes = machine->numa_state->num_nodes;
int i, j;
@@ -290,13 +289,10 @@ static void spapr_numa_FORM1_affinity_init(SpaprMachineState *spapr,
}
/*
- * Guests pseries-5.1 and older uses zeroed associativity domains,
+ * Guests that have only one NUMA node use zeroed associativity domains,
* i.e. no domain definition based on NUMA distance input.
- *
- * Same thing with guests that have only one NUMA node.
*/
- if (smc->pre_5_2_numa_associativity ||
- machine->numa_state->num_nodes <= 1) {
+ if (machine->numa_state->num_nodes <= 1) {
return;
}
@@ -430,7 +426,6 @@ static void spapr_numa_FORM1_write_rtas_dt(SpaprMachineState *spapr,
void *fdt, int rtas)
{
MachineState *ms = MACHINE(spapr);
- SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr);
uint32_t refpoints[] = {
cpu_to_be32(0x4),
cpu_to_be32(0x3),
@@ -447,30 +442,6 @@ static void spapr_numa_FORM1_write_rtas_dt(SpaprMachineState *spapr,
cpu_to_be32(maxdomain)
};
- if (smc->pre_5_2_numa_associativity ||
- ms->numa_state->num_nodes <= 1) {
- uint32_t legacy_refpoints[] = {
- cpu_to_be32(0x4),
- cpu_to_be32(0x4),
- cpu_to_be32(0x2),
- };
- uint32_t legacy_maxdomains[] = {
- cpu_to_be32(4),
- cpu_to_be32(0),
- cpu_to_be32(0),
- cpu_to_be32(0),
- cpu_to_be32(maxdomain ? maxdomain : 1),
- };
-
- G_STATIC_ASSERT(sizeof(legacy_refpoints) <= sizeof(refpoints));
- G_STATIC_ASSERT(sizeof(legacy_maxdomains) <= sizeof(maxdomains));
-
- nr_refpoints = 3;
-
- memcpy(refpoints, legacy_refpoints, sizeof(legacy_refpoints));
- memcpy(maxdomains, legacy_maxdomains, sizeof(legacy_maxdomains));
- }
-
_FDT(fdt_setprop(fdt, rtas, "ibm,associativity-reference-points",
refpoints, nr_refpoints * sizeof(refpoints[0])));
--
2.56.1
next prev parent reply other threads:[~2026-12-01 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 7:55 [PATCH 0/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.x machines Thomas Huth
2026-12-01 7:55 ` [PATCH 1/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.0 machine Thomas Huth
2026-12-01 7:55 ` Thomas Huth [this message]
2026-12-01 7:55 ` [PATCH 3/3] hw/ppc/spapr: Remove obsolete code for the pseries-5.2 machine Thomas Huth
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=20261201075536.40736-3-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=amachhiw@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.