[PATCH-for-9.1] target/ppc: Unify TYPE_POWERPC_CPU definition for 32/64-bit

Philippe Mathieu-Daudé posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240322183450.25284-1-philmd@linaro.org
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>
target/ppc/cpu-qom.h | 4 ----
1 file changed, 4 deletions(-)
[PATCH-for-9.1] target/ppc: Unify TYPE_POWERPC_CPU definition for 32/64-bit
Posted by Philippe Mathieu-Daudé 1 month ago
Apparently there is no wordsize special use with the QOM
TYPE_POWERPC_CPU typename. Unify 32 and 64-bit with a single
common definition.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/ppc/cpu-qom.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
index 8247fa2336..ed75f1b690 100644
--- a/target/ppc/cpu-qom.h
+++ b/target/ppc/cpu-qom.h
@@ -23,11 +23,7 @@
 #include "exec/gdbstub.h"
 #include "hw/core/cpu.h"
 
-#ifdef TARGET_PPC64
-#define TYPE_POWERPC_CPU "powerpc64-cpu"
-#else
 #define TYPE_POWERPC_CPU "powerpc-cpu"
-#endif
 
 OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWERPC_CPU)
 
-- 
2.41.0


Re: [PATCH-for-9.1] target/ppc: Unify TYPE_POWERPC_CPU definition for 32/64-bit
Posted by Thomas Huth 1 month ago
On 22/03/2024 19.34, Philippe Mathieu-Daudé wrote:
> Apparently there is no wordsize special use with the QOM
> TYPE_POWERPC_CPU typename. Unify 32 and 64-bit with a single
> common definition.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/ppc/cpu-qom.h | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
> index 8247fa2336..ed75f1b690 100644
> --- a/target/ppc/cpu-qom.h
> +++ b/target/ppc/cpu-qom.h
> @@ -23,11 +23,7 @@
>   #include "exec/gdbstub.h"
>   #include "hw/core/cpu.h"
>   
> -#ifdef TARGET_PPC64
> -#define TYPE_POWERPC_CPU "powerpc64-cpu"
> -#else
>   #define TYPE_POWERPC_CPU "powerpc-cpu"
> -#endif

Have you tried a bunch of migrations with ppc machines from an older QEMU to 
a QEMU with this change and back, to make sure that there are no regressions?

  Thomas