On 9/23/24 11:30, Bernhard Beschow wrote:
Allows to clearly mark code sections relying on this device type.

Signed-off-by: Bernhard Beschow <shen...@gmail.com>


Reviewed-by: Cédric Le Goater <c...@redhat.com>

Thanks,

C.



---
  hw/ppc/e500.c       | 2 +-
  hw/intc/Kconfig     | 4 ++++
  hw/intc/meson.build | 3 +--
  3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 4ee4304a8a..149e608324 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -828,7 +828,7 @@ static DeviceState 
*ppce500_init_mpic_qemu(PPCE500MachineState *pms,
  static DeviceState *ppce500_init_mpic_kvm(const PPCE500MachineClass *pmc,
                                            Error **errp)
  {
-#ifdef CONFIG_KVM
+#ifdef CONFIG_OPENPIC_KVM
      DeviceState *dev;
      CPUState *cs;
diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
index dd405bdb5d..a3df98ae59 100644
--- a/hw/intc/Kconfig
+++ b/hw/intc/Kconfig
@@ -16,6 +16,10 @@ config OPENPIC
      bool
      select MSI_NONBROKEN
+config OPENPIC_KVM
+    bool
+    depends on OPENPIC && KVM
+
  config APIC
      bool
      select MSI_NONBROKEN
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index 6bfdc4eb33..b9de6bf5c6 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -48,8 +48,7 @@ specific_ss.add(when: 'CONFIG_IOAPIC', if_true: 
files('ioapic.c'))
  specific_ss.add(when: 'CONFIG_LOONGSON_LIOINTC', if_true: 
files('loongson_liointc.c'))
  specific_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gic.c'))
  specific_ss.add(when: 'CONFIG_OMPIC', if_true: files('ompic.c'))
-specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_OPENPIC'],
-               if_true: files('openpic_kvm.c'))
+specific_ss.add(when: 'CONFIG_OPENPIC_KVM', if_true: files('openpic_kvm.c'))
  specific_ss.add(when: 'CONFIG_POWERNV', if_true: files('xics_pnv.c', 
'pnv_xive.c', 'pnv_xive2.c'))
  specific_ss.add(when: 'CONFIG_PPC_UIC', if_true: files('ppc-uic.c'))
  specific_ss.add(when: 'CONFIG_RX_ICU', if_true: files('rx_icu.c'))


Reply via email to