From nobody Sat Feb 7 05:26:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1494405316545704.9965901617395; Wed, 10 May 2017 01:35:16 -0700 (PDT) Received: from localhost ([::1]:41108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8N5X-0001pV-6G for importer@patchew.org; Wed, 10 May 2017 04:35:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8N3o-0000hB-SR for qemu-devel@nongnu.org; Wed, 10 May 2017 04:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8N3o-0003kV-2Y for qemu-devel@nongnu.org; Wed, 10 May 2017 04:33:28 -0400 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:36355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8N3n-0003k0-Tt for qemu-devel@nongnu.org; Wed, 10 May 2017 04:33:28 -0400 Received: by mail-pg0-x243.google.com with SMTP id 64so3227262pgb.3 for ; Wed, 10 May 2017 01:33:27 -0700 (PDT) Received: from eric.tencent.com ([203.205.141.37]) by smtp.gmail.com with ESMTPSA id z125sm3829043pfb.64.2017.05.10.01.33.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 01:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CMKvEvxEPV2HQ6E5xzmI+od/cl4K9BS75KvwKWEV1+A=; b=gl/9sVKEcOC15qKpzm5MmVcIQz6kvFN4eIGdm2/hu7K+ZVSLz1XFXmBpJtJIT9qkmX Szj9LaEbL1zhSZMW6Q+SQvYmaBL3HJiIkbTbqAadi4EVSieJ5j3XYWXntEYu5wSsTxk/ qT1lYxzter9gJZCIJJw7HT5nuGn81GlbWYdfAguhmWLDVa870UV8j5ELmqi41UdMeemj LAH7FVwOTAKsFXVoPfcx9kYMN3s2qnpzsNhzvry3he1FwtUP88+QTPb45ugOq9wLpGXy IS0m+5XlmHf7JEZLJwVFXal636mGIEx0OOkVZTpOFLwYtXYzcKqQt7CeGfPQbEdyK8wP tWyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CMKvEvxEPV2HQ6E5xzmI+od/cl4K9BS75KvwKWEV1+A=; b=UFkiMGD7rwaSJO8l41RwSGZ/13wwe/hfB0N8NVO/Fk9tGTcc1DIn+TvxhYtWCsuqw5 00yp+dF9MOgKLurJRdeSfaTt7yBXmTFx1EVqfIt5xnhZ85tVos6AhBFKqXwfm8nr/Yo6 b60t9AjXWnxjonoY7HiY7m9pm8n7i+79/ZWIbtQ1/l5KHI2mQ1kyXiKpaCD6wQSI/ZRc UUOeCR0MRHvkiC00/pdQP9/L2xxdkBtZTjvWICCHt8bIgCutwfhdsxwiMIm/mc6a7ZTJ KwqPLKEJrjjyjmuj6OBTfX9wZILOGwQ9NE+toByclCkGfl5ceBNvwVdLC/NgTUPhsM9h lTAw== X-Gm-Message-State: AODbwcDo2YmCeGCWe4bzKAdEVPI9VP8WMQbDcXLPYn0OHZRTi9Di5NRp Ho9JjW830RjcJkY5 X-Received: by 10.98.67.8 with SMTP id q8mr4727326pfa.67.1494405207046; Wed, 10 May 2017 01:33:27 -0700 (PDT) From: guangrong.xiao@gmail.com X-Google-Original-From: xiaoguangrong@tencent.com To: pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com Date: Wed, 10 May 2017 16:32:57 +0800 Message-Id: <20170510083259.3900-4-xiaoguangrong@tencent.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170510083259.3900-1-xiaoguangrong@tencent.com> References: <20170510083259.3900-1-xiaoguangrong@tencent.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PATCH v3 3/5] mc146818rtc: ensure LOST_TICK_POLICY_SLEW is only enabled on TARGET_I386 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xiao Guangrong , yunfangtai@tencent.com, qemu-devel@nongnu.org, kvm@vger.kernel.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Xiao Guangrong 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 **e= rrp) =20 rtc_set_date_from_host(isadev); =20 -#ifdef TARGET_I386 switch (s->lost_tick_policy) { +#ifdef TARGET_I386 case LOST_TICK_POLICY_SLEW: s->coalesced_timer =3D 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 =20 s->periodic_timer =3D timer_new_ns(rtc_clock, rtc_periodic_timer, s); s->update_timer =3D timer_new_ns(rtc_clock, rtc_update_timer, s); --=20 2.9.3