diff mbox series

classes/qemu: move QEMU_EXTRAOPTIONS for PPC to the relevant tunes

Message ID 20250109181145.2057509-1-ross.burton@arm.com
State New
Headers show
Series classes/qemu: move QEMU_EXTRAOPTIONS for PPC to the relevant tunes | expand

Commit Message

Ross Burton Jan. 9, 2025, 6:11 p.m. UTC
Every other architecture has the QEMU_EXTRAOPTIONS assignments in the
tune files, so move the PPC ones too.

Leave the MACHINE_ARCH workarounds present for now as these are masking
a genuine bug (#15647) that needs to be resolved properly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/classes-recipe/qemu.bbclass                     | 8 --------
 meta/conf/machine/include/powerpc/arch-powerpc64.inc | 1 +
 meta/conf/machine/include/powerpc/tune-ppc7400.inc   | 1 +
 meta/conf/machine/include/powerpc/tune-ppce500mc.inc | 1 +
 meta/conf/machine/include/powerpc/tune-ppce500v2.inc | 1 +
 meta/conf/machine/include/powerpc/tune-ppce5500.inc  | 2 ++
 meta/conf/machine/include/powerpc/tune-ppce6500.inc  | 2 ++
 7 files changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/qemu.bbclass b/meta/classes-recipe/qemu.bbclass
index dbb5ee0b666..a375bde8985 100644
--- a/meta/classes-recipe/qemu.bbclass
+++ b/meta/classes-recipe/qemu.bbclass
@@ -63,14 +63,6 @@  def qemu_run_binary(data, rootfs_path, binary):
 QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}"
 QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}"
 
-QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2"
-QEMU_EXTRAOPTIONS_ppce500mc = " -cpu e500mc"
-QEMU_EXTRAOPTIONS_ppce5500 = " -cpu e500mc"
-QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e500mc"
-QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e500mc"
-QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e500mc"
-QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400"
-QEMU_EXTRAOPTIONS_powerpc64le = " -cpu POWER9"
 # Some packages e.g. fwupd sets PACKAGE_ARCH = MACHINE_ARCH and uses meson which
 # needs right options to usermode qemu
 QEMU_EXTRAOPTIONS_qemuppc = " -cpu 7400"
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc64.inc b/meta/conf/machine/include/powerpc/arch-powerpc64.inc
index 2533151869b..af0635a641f 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc64.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc64.inc
@@ -21,3 +21,4 @@  TUNE_FEATURES:tune-powerpc64le = "m64 fpu-hard"
 BASE_LIB:tune-powerpc64le = "lib64"
 TUNE_PKGARCH:tune-powerpc64le = "powerpc64le"
 PACKAGE_EXTRA_ARCHS:tune-powerpc64le = "powerpc64le"
+QEMU_EXTRAOPTIONS_powerpc64le = " -cpu POWER9"
diff --git a/meta/conf/machine/include/powerpc/tune-ppc7400.inc b/meta/conf/machine/include/powerpc/tune-ppc7400.inc
index 49b94f5ee1c..6d3c158bbb5 100644
--- a/meta/conf/machine/include/powerpc/tune-ppc7400.inc
+++ b/meta/conf/machine/include/powerpc/tune-ppc7400.inc
@@ -9,3 +9,4 @@  AVAILTUNES += "ppc7400"
 TUNE_FEATURES:tune-ppc7400 = "m32 fpu-hard ppc7400 altivec bigendian"
 TUNE_PKGARCH:tune-ppc7400 = "ppc7400"
 PACKAGE_EXTRA_ARCHS:tune-ppc7400 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc} ppc7400"
+QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400"
diff --git a/meta/conf/machine/include/powerpc/tune-ppce500mc.inc b/meta/conf/machine/include/powerpc/tune-ppce500mc.inc
index 036f8b26315..8c4630b368c 100644
--- a/meta/conf/machine/include/powerpc/tune-ppce500mc.inc
+++ b/meta/conf/machine/include/powerpc/tune-ppce500mc.inc
@@ -9,6 +9,7 @@  AVAILTUNES += "ppce500mc"
 TUNE_FEATURES:tune-ppce500mc = "m32 fpu-hard ppce500mc bigendian"
 TUNE_PKGARCH:tune-ppce500mc = "ppce500mc"
 PACKAGE_EXTRA_ARCHS:tune-ppce500mc = "${PACKAGE_EXTRA_ARCHS:tune-powerpc} ppce500mc"
+QEMU_EXTRAOPTIONS_ppce500mc = " -cpu e500mc"
 
 # pass -mcpu=e500mc for ppce500mc kernel cross compile
 TARGET_CC_KERNEL_ARCH = "-mcpu=e500mc"
diff --git a/meta/conf/machine/include/powerpc/tune-ppce500v2.inc b/meta/conf/machine/include/powerpc/tune-ppce500v2.inc
index 461164d818f..204580ee15a 100644
--- a/meta/conf/machine/include/powerpc/tune-ppce500v2.inc
+++ b/meta/conf/machine/include/powerpc/tune-ppce500v2.inc
@@ -18,3 +18,4 @@  AVAILTUNES += "ppce500v2"
 TUNE_FEATURES:tune-ppce500v2 = "m32 ppce500v2 bigendian"
 TUNE_PKGARCH:tune-ppce500v2 = "ppce500v2"
 PACKAGE_EXTRA_ARCHS:tune-ppce500v2 = "ppce500v2"
+QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2"
diff --git a/meta/conf/machine/include/powerpc/tune-ppce5500.inc b/meta/conf/machine/include/powerpc/tune-ppce5500.inc
index 4915b81ee4d..8976c1612fd 100644
--- a/meta/conf/machine/include/powerpc/tune-ppce5500.inc
+++ b/meta/conf/machine/include/powerpc/tune-ppce5500.inc
@@ -10,11 +10,13 @@  TUNE_FEATURES:tune-ppce5500 = "m32 fpu-hard e5500 bigendian"
 BASE_LIB:tune-ppce5500 = "lib"
 TUNE_PKGARCH:tune-ppce5500 = "ppce5500"
 PACKAGE_EXTRA_ARCHS:tune-ppce5500 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc} ppce5500"
+QEMU_EXTRAOPTIONS_ppce5500 = " -cpu e500mc"
 
 TUNE_FEATURES:tune-ppc64e5500 = "m64 fpu-hard e5500 bigendian"
 BASE_LIB:tune-ppc64e5500 = "lib64"
 TUNE_PKGARCH:tune-ppc64e5500 = "ppc64e5500"
 PACKAGE_EXTRA_ARCHS:tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc64} ppc64e5500"
+QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e500mc"
 
 # QEMU usermode fails with invalid instruction error (YOCTO: #10304)
 MACHINE_FEATURES_BACKFILL_CONSIDERED:append = "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' qemu-usermode', '', d)}"
diff --git a/meta/conf/machine/include/powerpc/tune-ppce6500.inc b/meta/conf/machine/include/powerpc/tune-ppce6500.inc
index f6310ab4c44..b0efe1924c5 100644
--- a/meta/conf/machine/include/powerpc/tune-ppce6500.inc
+++ b/meta/conf/machine/include/powerpc/tune-ppce6500.inc
@@ -10,11 +10,13 @@  TUNE_FEATURES:tune-ppce6500 = "m32 fpu-hard e6500 altivec bigendian"
 BASE_LIB:tune-ppce6500 = "lib"
 TUNE_PKGARCH:tune-ppce6500 = "ppce6500"
 PACKAGE_EXTRA_ARCHS:tune-ppce6500 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc} ppce6500"
+QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e500mc"
 
 TUNE_FEATURES:tune-ppc64e6500 = "m64 fpu-hard e6500 altivec bigendian"
 BASE_LIB:tune-ppc64e6500 = "lib64"
 TUNE_PKGARCH:tune-ppc64e6500 = "ppc64e6500"
 PACKAGE_EXTRA_ARCHS:tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc64} ppc64e6500"
+QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e500mc"
 
 # QEMU usermode fails with invalid instruction error (YOCTO: #10304)
 MACHINE_FEATURES_BACKFILL_CONSIDERED:append = "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' qemu-usermode', '', d)}"