[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/33] mc146818rtc: ensure LOST_TICK_POLICY_SLEW is o
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 03/33] mc146818rtc: ensure LOST_TICK_POLICY_SLEW is only enabled on TARGET_I386 |
Date: |
Thu, 1 Jun 2017 14:41:21 +0200 |
From: Xiao Guangrong <address@hidden>
Any tick policy specified on other platforms rather on TARGET_I386
will fall back to LOST_TICK_POLICY_DISCARD silently, this patch makes
sure only TARGET_I386 can enable LOST_TICK_POLICY_SLEW
After that, we can enable LOST_TICK_POLICY_SLEW in the common code
which need not use '#ifdef TARGET_I386' to make these code be x86
specific anymore
Signed-off-by: Xiao Guangrong <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/timer/mc146818rtc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index aeb60cc..4870a72 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -974,19 +974,19 @@ static void rtc_realizefn(DeviceState *dev, Error **errp)
rtc_set_date_from_host(isadev);
-#ifdef TARGET_I386
switch (s->lost_tick_policy) {
+#ifdef TARGET_I386
case LOST_TICK_POLICY_SLEW:
s->coalesced_timer =
timer_new_ns(rtc_clock, rtc_coalesced_timer, s);
break;
+#endif
case LOST_TICK_POLICY_DISCARD:
break;
default:
error_setg(errp, "Invalid lost tick policy.");
return;
}
-#endif
s->periodic_timer = timer_new_ns(rtc_clock, rtc_periodic_timer, s);
s->update_timer = timer_new_ns(rtc_clock, rtc_update_timer, s);
--
1.8.3.1
- [Qemu-devel] [PULL 00/33] Misc patches for 2017-06-01, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 01/33] mc146818rtc: update periodic timer only if it is needed, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 04/33] mc146818rtc: drop unnecessary '#ifdef TARGET_I386', Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 07/33] msix: trace control bit write op, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 03/33] mc146818rtc: ensure LOST_TICK_POLICY_SLEW is only enabled on TARGET_I386,
Paolo Bonzini <=
- [Qemu-devel] [PULL 02/33] mc146818rtc: precisely count the clock for periodic timer, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 08/33] kvm: irqchip: skip update msi when disabled, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 09/33] Check the return value of fcntl in qemu_set_cloexec, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 05/33] mc146818rtc: embrace all x86 specific code, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 10/33] nbd: strict nbd_wr_syncv, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 06/33] kvm: irqchip: trace changes on msi add/remove, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 15/33] exec: simplify phys_page_find() params, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 14/33] nbd/client.c: use errp instead of LOG, Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 12/33] nbd: add errp parameter to nbd_wr_syncv(), Paolo Bonzini, 2017/06/01
- [Qemu-devel] [PULL 13/33] nbd: add errp to read_sync, write_sync and drop_sync, Paolo Bonzini, 2017/06/01