From 64552b6be4758d3a774f7787b294543ccebd5358 Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
Date: Mon, 12 Aug 2019 07:23:42 +0200
Subject: Include hw/irq.h a lot less
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In my "build everything" tree, changing hw/irq.h triggers a recompile
of some 5400 out of 6600 objects (not counting tests and objects that
don't depend on qemu/osdep.h).

hw/hw.h supposedly includes it for convenience.  Several other headers
include it just to get qemu_irq and.or qemu_irq_handler.

Move the qemu_irq and qemu_irq_handler typedefs from hw/irq.h to
qemu/typedefs.h, and then include hw/irq.h only where it's still
needed.  Touching it now recompiles only some 500 objects.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190812052359.30071-13-armbru@redhat.com>
---
 hw/arm/armsse.c         | 1 +
 hw/arm/exynos4210.c     | 1 +
 hw/arm/exynos4_boards.c | 1 +
 hw/arm/integratorcp.c   | 1 +
 hw/arm/msf2-soc.c       | 1 +
 hw/arm/musicpal.c       | 1 +
 hw/arm/omap1.c          | 1 +
 hw/arm/omap2.c          | 1 +
 hw/arm/palm.c           | 2 ++
 hw/arm/pxa2xx.c         | 1 +
 hw/arm/pxa2xx_gpio.c    | 1 +
 hw/arm/realview.c       | 1 +
 hw/arm/smmuv3.c         | 1 +
 hw/arm/spitz.c          | 1 +
 hw/arm/stellaris.c      | 1 +
 hw/arm/strongarm.c      | 1 +
 hw/arm/tosa.c           | 1 +
 hw/arm/versatilepb.c    | 1 +
 hw/arm/virt.c           | 1 +
 hw/arm/z2.c             | 1 +
 20 files changed, 21 insertions(+)

(limited to 'hw/arm')

diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
index b5c614c..85cfa41 100644
--- a/hw/arm/armsse.c
+++ b/hw/arm/armsse.c
@@ -19,6 +19,7 @@
 #include "hw/registerfields.h"
 #include "hw/arm/armsse.h"
 #include "hw/arm/boot.h"
+#include "hw/irq.h"
 
 /* Format of the System Information block SYS_CONFIG register */
 typedef enum SysConfigFormat {
diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
index becd864..9aa5ec3 100644
--- a/hw/arm/exynos4210.c
+++ b/hw/arm/exynos4210.c
@@ -26,6 +26,7 @@
 #include "qemu/log.h"
 #include "cpu.h"
 #include "hw/cpu/a9mpcore.h"
+#include "hw/irq.h"
 #include "hw/boards.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index ac0b0dc..7624e16 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -34,6 +34,7 @@
 #include "hw/arm/exynos4210.h"
 #include "hw/net/lan9118.h"
 #include "hw/boards.h"
+#include "hw/irq.h"
 
 #define SMDK_LAN9118_BASE_ADDR      0x05000000
 
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index 200c010..d602568 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -20,6 +20,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
 #include "hw/char/pl011.h"
+#include "hw/irq.h"
 
 #define TYPE_INTEGRATOR_CM "integrator_core"
 #define INTEGRATOR_CM(obj) \
diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c
index 1ccb644..4e5251c 100644
--- a/hw/arm/msf2-soc.c
+++ b/hw/arm/msf2-soc.c
@@ -27,6 +27,7 @@
 #include "qapi/error.h"
 #include "exec/address-spaces.h"
 #include "hw/char/serial.h"
+#include "hw/irq.h"
 #include "hw/boards.h"
 #include "hw/arm/msf2-soc.h"
 #include "hw/misc/unimp.h"
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 95d56f3..848e49f 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -23,6 +23,7 @@
 #include "hw/block/flash.h"
 #include "ui/console.h"
 #include "hw/i2c/i2c.h"
+#include "hw/irq.h"
 #include "hw/audio/wm8750.h"
 #include "sysemu/block-backend.h"
 #include "exec/address-spaces.h"
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index beaddaf..cce6710 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -24,6 +24,7 @@
 #include "cpu.h"
 #include "hw/boards.h"
 #include "hw/hw.h"
+#include "hw/irq.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/omap.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
index 7d4cac1..397630e 100644
--- a/hw/arm/omap2.c
+++ b/hw/arm/omap2.c
@@ -26,6 +26,7 @@
 #include "sysemu/reset.h"
 #include "hw/boards.h"
 #include "hw/hw.h"
+#include "hw/irq.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/omap.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/arm/palm.c b/hw/arm/palm.c
index 9eb9612b..a5eccb7 100644
--- a/hw/arm/palm.c
+++ b/hw/arm/palm.c
@@ -16,6 +16,7 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/hw.h"
@@ -27,6 +28,7 @@
 #include "hw/boards.h"
 #include "hw/arm/boot.h"
 #include "hw/input/tsc2xxx.h"
+#include "hw/irq.h"
 #include "hw/loader.h"
 #include "exec/address-spaces.h"
 #include "cpu.h"
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index e2e43ae..ab3fbd7 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -18,6 +18,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/char/serial.h"
 #include "hw/i2c/i2c.h"
+#include "hw/irq.h"
 #include "hw/ssi/ssi.h"
 #include "chardev/char-fe.h"
 #include "sysemu/blockdev.h"
diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c
index d1fc9cb..1b1fc49 100644
--- a/hw/arm/pxa2xx_gpio.c
+++ b/hw/arm/pxa2xx_gpio.c
@@ -10,6 +10,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "hw/hw.h"
+#include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "hw/arm/pxa.h"
 #include "qemu/log.h"
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index 7c56c8d..b108a9a 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -25,6 +25,7 @@
 #include "hw/char/pl011.h"
 #include "hw/cpu/a9mpcore.h"
 #include "hw/intc/realview_gic.h"
+#include "hw/irq.h"
 
 #define SMP_BOOT_ADDR 0xe0000000
 #define SMP_BOOTREG_ADDR 0x10000030
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index e96d5be..ccca607 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -18,6 +18,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/boards.h"
+#include "hw/irq.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
 #include "hw/qdev-core.h"
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index 723cf5d..b90431f 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -18,6 +18,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/pcmcia.h"
 #include "hw/i2c/i2c.h"
+#include "hw/irq.h"
 #include "hw/ssi/ssi.h"
 #include "hw/block/flash.h"
 #include "qemu/timer.h"
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 499035f..088ae2d 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -22,6 +22,7 @@
 #include "hw/arm/armv7m.h"
 #include "hw/char/pl011.h"
 #include "hw/input/gamepad.h"
+#include "hw/irq.h"
 #include "hw/watchdog/cmsdk-apb-watchdog.h"
 #include "hw/misc/unimp.h"
 #include "cpu.h"
diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c
index fed51a8..2e016f4 100644
--- a/hw/arm/strongarm.c
+++ b/hw/arm/strongarm.c
@@ -31,6 +31,7 @@
 #include "qemu-common.h"
 #include "cpu.h"
 #include "hw/boards.h"
+#include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "strongarm.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c
index 7843d68..80c61ae 100644
--- a/hw/arm/tosa.c
+++ b/hw/arm/tosa.c
@@ -21,6 +21,7 @@
 #include "hw/boards.h"
 #include "hw/display/tc6393xb.h"
 #include "hw/i2c/i2c.h"
+#include "hw/irq.h"
 #include "hw/ssi/ssi.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index e585711..bc92234 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -17,6 +17,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/pci/pci.h"
 #include "hw/i2c/i2c.h"
+#include "hw/irq.h"
 #include "hw/boards.h"
 #include "exec/address-spaces.h"
 #include "hw/block/flash.h"
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index d9496c9..0e5152e 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -57,6 +57,7 @@
 #include "hw/arm/fdt.h"
 #include "hw/intc/arm_gic.h"
 #include "hw/intc/arm_gicv3_common.h"
+#include "hw/irq.h"
 #include "kvm_arm.h"
 #include "hw/firmware/smbios.h"
 #include "qapi/visitor.h"
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index 44aa748..366d46f 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -16,6 +16,7 @@
 #include "hw/arm/pxa.h"
 #include "hw/arm/boot.h"
 #include "hw/i2c/i2c.h"
+#include "hw/irq.h"
 #include "hw/ssi/ssi.h"
 #include "hw/boards.h"
 #include "sysemu/sysemu.h"
-- 
cgit v1.1