Skip to contentSkip to conversation

hw/cpu: Build a15mpcore.c once as common object

PATCH Applied Philippe Mathieu-Daudé 3 participants 3 messages Feb 25 – Feb 27 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/cpu: Build a15mpcore.c once as common object

a15mpcore.c doesn't need to include the target-specific 'kvm_arm.h' header, it only lacks the qemu_get_cpu() declaration which comes from 'hw/core/cpu.h'. Include the latter and build as common object.

---
 hw/cpu/a15mpcore.c | 2 +-
 hw/cpu/meson.build | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/cpu/a15mpcore.c +1 -1
index 28cc4b3a4bd..28cda55ccf8 100644
@@ -22,10 +22,10 @@
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "hw/cpu/a15mpcore.h"
+#include "hw/core/cpu.h"
 #include "hw/core/irq.h"
 #include "hw/core/qdev-properties.h"
 #include "system/kvm.h"
-#include "kvm_arm.h"
 #include "target/arm/gtimer.h"
 
 static void a15mp_priv_set_irq(void *opaque, int irq, int level)
hw/cpu/meson.build +1 -1
index 9d36bf8ae2c..9c1535ca325 100644
@@ -4,4 +4,4 @@ system_ss.add(when: 'CONFIG_CPU_CLUSTER', if_true: files('cluster.c'))
 system_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
 system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
 system_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c'))
-specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
+system_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Philippe Mathieu-Daudé

a15mpcore.c doesn't need to include the target-specific 'kvm_arm.h' header, it only lacks the qemu_get_cpu() declaration which comes from 'hw/core/cpu.h'. Include the latter and build as common object.

---
  hw/cpu/a15mpcore.c | 2 +-
  hw/cpu/meson.build | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
hw/cpu/a15mpcore.c +1 -1
index 28cc4b3a4bd..28cda55ccf8 100644
@@ -22,10 +22,10 @@
  #include "qapi/error.h"
  #include "qemu/module.h"
  #include "hw/cpu/a15mpcore.h"
+#include "hw/core/cpu.h"
  #include "hw/core/irq.h"
  #include "hw/core/qdev-properties.h"
  #include "system/kvm.h"
-#include "kvm_arm.h"
  #include "target/arm/gtimer.h"
 
  static void a15mp_priv_set_irq(void *opaque, int irq, int level)
hw/cpu/meson.build +0 -0
index 9d36bf8ae2c..9c1535ca325 100644

hw/cpu/meson.build system_ss.add(when: 'CONFIG_CPU_CLUSTER', if_true: files('cluster.c')) · line 7

Quoted 5 lines
hw/cpu/meson.build +1 -1
@@ -4,4 +4,4 @@ system_ss.add(when: 'CONFIG_CPU_CLUSTER', if_true: files('cluster.c'))
  system_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
  system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
  system_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c'))
-specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
+system_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))

r~

#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 6 lines · Philippe Mathieu-Daudé

a15mpcore.c doesn't need to include the target-specific 'kvm_arm.h' header, it only lacks the qemu_get_cpu() declaration which comes from 'hw/core/cpu.h'. Include the latter and build as common object.

Applied to target-arm.next, thanks (and now in master, looks like I forgot to hit 'send' on this mail...).

-- PMM