Include migration/vmstate.h less
In my "build everything" tree, changing migration/vmstate.h triggers a
recompile of some 2700 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 VMStateDescription. The previous commit made
that unnecessary.
Include migration/vmstate.h only where it's still needed. Touching it
now recompiles only some 1600 objects.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20190812052359.30071-16-armbru@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c
index da361f5..b3c4aed 100644
--- a/hw/input/adb-kbd.c
+++ b/hw/input/adb-kbd.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "hw/input/adb.h"
+#include "migration/vmstate.h"
#include "qemu/module.h"
#include "ui/input.h"
#include "hw/input/adb-keys.h"
diff --git a/hw/input/adb-mouse.c b/hw/input/adb-mouse.c
index 52526fd..aeba41b 100644
--- a/hw/input/adb-mouse.c
+++ b/hw/input/adb-mouse.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "ui/console.h"
#include "hw/input/adb.h"
+#include "migration/vmstate.h"
#include "qemu/module.h"
#include "adb-internal.h"
#include "trace.h"
diff --git a/hw/input/adb.c b/hw/input/adb.c
index 1446f32..80ba125 100644
--- a/hw/input/adb.c
+++ b/hw/input/adb.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "hw/input/adb.h"
+#include "migration/vmstate.h"
#include "qemu/module.h"
#include "adb-internal.h"
diff --git a/hw/input/hid.c b/hw/input/hid.c
index aa4fb82..c570ca2 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -22,11 +22,13 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "ui/console.h"
#include "qemu/timer.h"
#include "hw/input/hid.h"
+#include "migration/vmstate.h"
#include "trace.h"
#define HID_USAGE_ERROR_ROLLOVER 0x01
diff --git a/hw/input/lm832x.c b/hw/input/lm832x.c
index 2ab6d32..de03913 100644
--- a/hw/input/lm832x.c
+++ b/hw/input/lm832x.c
@@ -22,6 +22,7 @@
#include "hw/hw.h"
#include "hw/i2c/i2c.h"
#include "hw/irq.h"
+#include "migration/vmstate.h"
#include "qemu/module.h"
#include "qemu/timer.h"
#include "sysemu/reset.h"
diff --git a/hw/input/milkymist-softusb.c b/hw/input/milkymist-softusb.c
index 92e07fb..e17666d 100644
--- a/hw/input/milkymist-softusb.c
+++ b/hw/input/milkymist-softusb.c
@@ -25,6 +25,7 @@
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
+#include "migration/vmstate.h"
#include "trace.h"
#include "ui/console.h"
#include "hw/input/hid.h"
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 7e76ee7..cf16903 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -26,6 +26,7 @@
#include "qemu/log.h"
#include "hw/hw.h"
#include "hw/isa/isa.h"
+#include "migration/vmstate.h"
#include "hw/i386/pc.h"
#include "hw/input/ps2.h"
#include "hw/irq.h"
diff --git a/hw/input/pl050.c b/hw/input/pl050.c
index 2318dbf..1123037 100644
--- a/hw/input/pl050.c
+++ b/hw/input/pl050.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
+#include "migration/vmstate.h"
#include "hw/input/ps2.h"
#include "hw/irq.h"
#include "qemu/log.h"
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 8d922b0..07d07ee 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -26,6 +26,7 @@
#include "qemu/log.h"
#include "hw/hw.h"
#include "hw/input/ps2.h"
+#include "migration/vmstate.h"
#include "ui/console.h"
#include "ui/input.h"
#include "sysemu/reset.h"
diff --git a/hw/input/pxa2xx_keypad.c b/hw/input/pxa2xx_keypad.c
index 4788c96..31862a7d 100644
--- a/hw/input/pxa2xx_keypad.c
+++ b/hw/input/pxa2xx_keypad.c
@@ -14,6 +14,7 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
+#include "migration/vmstate.h"
#include "hw/arm/pxa.h"
#include "ui/console.h"
diff --git a/hw/input/stellaris_input.c b/hw/input/stellaris_input.c
index ffea054..7582117 100644
--- a/hw/input/stellaris_input.c
+++ b/hw/input/stellaris_input.c
@@ -11,6 +11,7 @@
#include "hw/hw.h"
#include "hw/input/gamepad.h"
#include "hw/irq.h"
+#include "migration/vmstate.h"
#include "ui/console.h"
typedef struct {
diff --git a/hw/input/tsc2005.c b/hw/input/tsc2005.c
index e21356c..b92a034 100644
--- a/hw/input/tsc2005.c
+++ b/hw/input/tsc2005.c
@@ -26,6 +26,7 @@
#include "ui/console.h"
#include "hw/input/tsc2xxx.h"
#include "hw/irq.h"
+#include "migration/vmstate.h"
#include "trace.h"
#define TSC_CUT_RESOLUTION(value, p) ((value) >> (16 - (p ? 12 : 10)))
diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c
index be7d948..182d372 100644
--- a/hw/input/tsc210x.c
+++ b/hw/input/tsc210x.c
@@ -28,6 +28,7 @@
#include "hw/arm/omap.h" /* For I2SCodec */
#include "hw/input/tsc2xxx.h"
#include "hw/irq.h"
+#include "migration/vmstate.h"
#define TSC_DATA_REGISTERS_PAGE 0x0
#define TSC_CONTROL_REGISTERS_PAGE 0x1