[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 3/5] mc146818rtc: ensure LOST_TICK_POLICY_SLEW is
From: |
guangrong . xiao |
Subject: |
[Qemu-devel] [PATCH v3 3/5] mc146818rtc: ensure LOST_TICK_POLICY_SLEW is only enabled on TARGET_I386 |
Date: |
Wed, 10 May 2017 16:32:57 +0800 |
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>
---
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 dac6744..9810bd5 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -980,19 +980,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);
--
2.9.3
- [Qemu-devel] [PATCH v3 0/5] mc146818rtc: fix Windows VM clock faster, guangrong . xiao, 2017/05/10
- [Qemu-devel] [PATCH v3 1/5] mc146818rtc: update periodic timer only if it is needed, guangrong . xiao, 2017/05/10
- [Qemu-devel] [PATCH v3 2/5] mc146818rtc: precisely count the clock for periodic timer, guangrong . xiao, 2017/05/10
- [Qemu-devel] [PATCH v3 3/5] mc146818rtc: ensure LOST_TICK_POLICY_SLEW is only enabled on TARGET_I386,
guangrong . xiao <=
- [Qemu-devel] [PATCH v3 4/5] mc146818rtc: drop unnecessary '#ifdef TARGET_I386', guangrong . xiao, 2017/05/10
- [Qemu-devel] [PATCH v3 5/5] mc146818rtc: embrace all x86 specific code, guangrong . xiao, 2017/05/10
- Re: [Qemu-devel] [PATCH v3 0/5] mc146818rtc: fix Windows VM clock faster, Paolo Bonzini, 2017/05/10
Re: [Qemu-devel] [PATCH v3 0/5] mc146818rtc: fix Windows VM clock faster, no-reply, 2017/05/10