aboutsummaryrefslogtreecommitdiff
path: root/hw/apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/apic.c')
-rw-r--r--hw/apic.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/hw/apic.c b/hw/apic.c
index 55ec7f128..a47c36637 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -17,7 +17,9 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "vl.h"
+#include "hw.h"
+#include "pc.h"
+#include "qemu-timer.h"
#ifdef USE_KVM
#include "qemu-kvm.h"
@@ -864,10 +866,10 @@ static void apic_save(QEMUFile *f, void *opaque)
qemu_put_be32s(f, &s->icr[0]);
qemu_put_be32s(f, &s->icr[1]);
qemu_put_be32s(f, &s->divide_conf);
- qemu_put_be32s(f, &s->count_shift);
+ qemu_put_be32(f, s->count_shift);
qemu_put_be32s(f, &s->initial_count);
- qemu_put_be64s(f, &s->initial_count_load_time);
- qemu_put_be64s(f, &s->next_time);
+ qemu_put_be64(f, s->initial_count_load_time);
+ qemu_put_be64(f, s->next_time);
qemu_put_timer(f, s->timer);
}
@@ -900,10 +902,10 @@ static int apic_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_be32s(f, &s->icr[0]);
qemu_get_be32s(f, &s->icr[1]);
qemu_get_be32s(f, &s->divide_conf);
- qemu_get_be32s(f, &s->count_shift);
+ s->count_shift=qemu_get_be32(f);
qemu_get_be32s(f, &s->initial_count);
- qemu_get_be64s(f, &s->initial_count_load_time);
- qemu_get_be64s(f, &s->next_time);
+ s->initial_count_load_time=qemu_get_be64(f);
+ s->next_time=qemu_get_be64(f);
if (version_id >= 2)
qemu_get_timer(f, s->timer);