diff mbox series

[6/6] pvpanic: break dependency on ISA_BUS adding PCI

Message ID 1603891979-11961-7-git-send-email-mihai.carabas@oracle.com
State New
Headers show
Series [1/6] hw/misc/pvpanic: Build the pvpanic device for any machine | expand

Commit Message

Mihai Carabas Oct. 28, 2020, 1:32 p.m. UTC
pvpanic is supported on ARM VIRT MACHINE as an PCI device, no need for an ISA
bus.

Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
---
 hw/misc/Kconfig   | 2 +-
 hw/misc/pvpanic.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 3185456..b650982 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -117,7 +117,7 @@  config IOTKIT_SYSINFO
 
 config PVPANIC
     bool
-    depends on ISA_BUS
+    depends on ISA_BUS || PCI
 
 config AUX
     bool
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index b0bf7d4..f80cf6c 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -106,6 +106,7 @@  static const MemoryRegionOps pvpanic_ops = {
     },
 };
 
+#ifdef CONFIG_ISA_BUS
 static void pvpanic_isa_initfn(Object *obj)
 {
     PVPanicISAState *s = PVPANIC_ISA_DEVICE(obj);
@@ -153,6 +154,7 @@  static TypeInfo pvpanic_isa_info = {
     .instance_init = pvpanic_isa_initfn,
     .class_init    = pvpanic_isa_class_init,
 };
+#endif
 
 /* pvpanic pci device*/
 
@@ -193,7 +195,9 @@  static TypeInfo pvpanic_pci_info = {
 
 static void pvpanic_register_types(void)
 {
+#ifdef CONFIG_ISA_BUS
     type_register_static(&pvpanic_isa_info);
+#endif
     type_register_static(&pvpanic_pci_info);
 }