new file mode 100644
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * SysBus internal helpers
+ *
+ * Copyright (c) 2021 QEMU contributors
+ */
+#ifndef HW_CORE_SYSBUS_INTERNAL_H
+#define HW_CORE_SYSBUS_INTERNAL_H
+
+#include "hw/sysbus.h"
+
+/* Following functions are only used by the platform-bus subsystem */
+qemu_irq sysbus_get_connected_irq(SysBusDevice *dev, int n);
+bool sysbus_is_irq_connected(SysBusDevice *dev, int n);
+
+#endif /* HW_CORE_SYSBUS_INTERNAL_H */
@@ -77,8 +77,6 @@ void sysbus_init_ioports(SysBusDevice *dev, uint32_t ioport, uint32_t size);
bool sysbus_has_irq(SysBusDevice *dev, int n);
bool sysbus_has_mmio(SysBusDevice *dev, unsigned int n);
void sysbus_connect_irq(SysBusDevice *dev, int n, qemu_irq irq);
-bool sysbus_is_irq_connected(SysBusDevice *dev, int n);
-qemu_irq sysbus_get_connected_irq(SysBusDevice *dev, int n);
void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr);
void sysbus_mmio_map_overlap(SysBusDevice *dev, int n, hwaddr addr,
int priority);
@@ -25,7 +25,7 @@
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
-
+#include "sysbus-internal.h"
/*
* Returns the PlatformBus IRQ number for a SysBusDevice irq number or -1 if
@@ -24,6 +24,7 @@
#include "monitor/monitor.h"
#include "exec/address-spaces.h"
#include "qdev-internal.h"
+#include "sysbus-internal.h"
static void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent);
static char *sysbus_get_fw_dev_path(DeviceState *dev);
sysbus_get_connected_irq() and sysbus_is_irq_connected() are only used by platform-bus.c; restrict them to hw/core/ by adding a local "sysbus-internal.h" header. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- hw/core/sysbus-internal.h | 16 ++++++++++++++++ include/hw/sysbus.h | 2 -- hw/core/platform-bus.c | 2 +- hw/core/sysbus.c | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 hw/core/sysbus-internal.h