[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 002/101] hw/ppc/mac.h: Remove MAX_CPUS macro
From: |
Cédric Le Goater |
Subject: |
[PULL 002/101] hw/ppc/mac.h: Remove MAX_CPUS macro |
Date: |
Thu, 16 Dec 2021 21:24:35 +0100 |
From: Peter Maydell <peter.maydell@linaro.org>
The mac.h header defines a MAX_CPUS macro. This is confusingly named,
because it suggests it's a generic setting, but in fact it's used
by only the g3beige and mac99 machines. It's also using a single
macro for two values which aren't inherently the same -- if one
of these two machines was updated to support SMP configurations
then it would want a different max_cpus value to the other.
Since the macro is used in only two places, just expand it out
and get rid of it. If hypothetical future work to support SMP
in these boards needs a compile-time-known limit on the number
of CPUs, we can give it a suitable name at that point.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20211105184216.120972-1-peter.maydell@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/ppc/mac.h | 3 ---
hw/ppc/mac_newworld.c | 3 ++-
hw/ppc/mac_oldworld.c | 3 ++-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h
index 22c8408078d2..a1fa8f8e41a9 100644
--- a/hw/ppc/mac.h
+++ b/hw/ppc/mac.h
@@ -36,9 +36,6 @@
#include "hw/pci-host/uninorth.h"
#include "qom/object.h"
-/* SMP is not enabled, for now */
-#define MAX_CPUS 1
-
#define NVRAM_SIZE 0x2000
#define PROM_FILENAME "openbios-ppc"
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 7bb7ac39975f..4bddb529c2a6 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -581,7 +581,8 @@ static void core99_machine_class_init(ObjectClass *oc, void
*data)
mc->desc = "Mac99 based PowerMAC";
mc->init = ppc_core99_init;
mc->block_default_type = IF_IDE;
- mc->max_cpus = MAX_CPUS;
+ /* SMP is not supported currently */
+ mc->max_cpus = 1;
mc->default_boot_order = "cd";
mc->default_display = "std";
mc->kvm_type = core99_kvm_type;
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index de2be960e6c4..7016979a7cd0 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -423,7 +423,8 @@ static void heathrow_class_init(ObjectClass *oc, void *data)
mc->desc = "Heathrow based PowerMAC";
mc->init = ppc_heathrow_init;
mc->block_default_type = IF_IDE;
- mc->max_cpus = MAX_CPUS;
+ /* SMP is not supported currently */
+ mc->max_cpus = 1;
#ifndef TARGET_PPC64
mc->is_default = true;
#endif
--
2.31.1
- [PULL v2 000/101] ppc queue, Cédric Le Goater, 2021/12/16
- [PULL 003/101] target/ppc: Fixed call to deferred exception, Cédric Le Goater, 2021/12/16
- [PULL 010/101] ivshmem-test.c: enable test_ivshmem_server for ppc64 arch, Cédric Le Goater, 2021/12/16
- [PULL 001/101] pseries: Update SLOF firmware image, Cédric Le Goater, 2021/12/16
- [PULL 002/101] hw/ppc/mac.h: Remove MAX_CPUS macro,
Cédric Le Goater <=
- [PULL 009/101] ivshmem.c: change endianness to LITTLE_ENDIAN, Cédric Le Goater, 2021/12/16
- [PULL 012/101] docs: Minor updates on the powernv documentation., Cédric Le Goater, 2021/12/16
- [PULL 007/101] target/ppc: Implement Vector Extract Mask, Cédric Le Goater, 2021/12/16
- [PULL 005/101] target/ppc: ppc_store_fpscr doesn't update bits 0 to 28 and 52, Cédric Le Goater, 2021/12/16
- [PULL 004/101] test/tcg/ppc64le: test mtfsf, Cédric Le Goater, 2021/12/16
- [PULL 019/101] Link new ppc-spapr-hcalls.rst file to pseries.rst., Cédric Le Goater, 2021/12/16
- [PULL 027/101] target/ppc: Update float_invalid_op_addsub for new flags, Cédric Le Goater, 2021/12/16
- [PULL 011/101] pci-host: Allow extended config space access for PowerNV PHB4 model, Cédric Le Goater, 2021/12/16
- [PULL 028/101] target/ppc: Update float_invalid_op_mul for new flags, Cédric Le Goater, 2021/12/16
- [PULL 025/101] softfloat: Add flag specific to convert non-nan to int, Cédric Le Goater, 2021/12/16