[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 19/26] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM K
From: |
Bernhard Beschow |
Subject: |
[PATCH v3 19/26] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch |
Date: |
Sat, 2 Nov 2024 14:17:08 +0100 |
Allows to clearly mark code sections relying on this device type.
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
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 f640195e62..f12329feda 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -826,7 +826,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'))
--
2.47.0
- [PATCH v3 00/26] E500 Cleanup, Bernhard Beschow, 2024/11/02
- [PATCH v3 06/26] hw/ppc/e500: Reuse TYPE_GPIO_PWR, Bernhard Beschow, 2024/11/02
- [PATCH v3 10/26] hw/ppc/mpc8544_guts: Populate POR PLL ratio status register, Bernhard Beschow, 2024/11/02
- [PATCH v3 14/26] hw/pci-host/ppce500: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
- [PATCH v3 15/26] hw/net/fsl_etsec/miim: Reuse MII constants, Bernhard Beschow, 2024/11/02
- [PATCH v3 19/26] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch,
Bernhard Beschow <=
- [PATCH v3 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 21/26] hw/block/pflash_cfi01: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 01/26] hw/ppc/e500: Do not leak struct boot_info, Bernhard Beschow, 2024/11/02
[PATCH v3 23/26] hw/rtc/ds1338: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 02/26] hw/ppc/e500: Remove firstenv variable, Bernhard Beschow, 2024/11/02
[PATCH v3 09/26] hw/ppc/ppce500_ccsr: Trace access to CCSR region, Bernhard Beschow, 2024/11/02