Received: by 10.223.185.116 with SMTP id b49csp3636938wrg; Mon, 19 Feb 2018 03:32:48 -0800 (PST) X-Google-Smtp-Source: AH8x2267iiRGDiAV9Crp6sIsuA8r4rSpfvv1kgQAR3i5Ry85qbUTOb3LIHyaDv5cjxJ0GQm4gkPj X-Received: by 2002:a17:902:2b84:: with SMTP id l4-v6mr14061083plb.338.1519039968447; Mon, 19 Feb 2018 03:32:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519039968; cv=none; d=google.com; s=arc-20160816; b=i/xSVg3eYEIjgpgcHpDjONGEFNZsSiBMFiBozLtTGR14EOl4GEAb6Uf0C4WgXAzbAn apDq9UMb0bh6BuwheEh9nqNFSSbQxEMi2w96bN5FH1S9eb3wfkTIunSpq3HKpunn8IFC /QfqfLe78/ElWdfRRiG9j547gQ59hzWTkAvL4qr67BHSL5dHX3zgiyQoH2jE3AksKeLx GSgrvA4G2w2S23rBzkoeUSPf71Ya3lfK4pz+AdcHOW41f3wzRnGcqmlb4Nh71usd2tju yTG40SAe+x/RqApBcyIUGeeoH/odO8FFZFBApARfurOK2+IR3Yf4/NR991FRAueq4G94 ir2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=NZ7KK0KC+DjZfqODfqY7aKxiAeF7hUjiYHaF7YT+0NI=; b=zMtS8c5d9WDMKa3cKeML7QLQtliDwhi5/1sit5Jz9KYX8wWSPUSnUe5WbL2chzHaai mABsU0UXUUTx+mzv7gItcs7aIPnSrAscuPqCWZyw0gYBCG/XlW29UPCLG2QiprCCc+QD 6s6ocqzowWWTuSXzQPlU7j0CiKq9IEjIZww8BukTS5Ha67LMFGTnvbOR/eViR+wwh5VG sTspqbW4Gu+BSUfGJU6YWoF/3fJI0v3ONBZyKGwlCiXWm4eSSEl16g4IxlG/GFRSEarj GyFPvV2pGt7NjvW+9VJKgrBpXm01VRHbuw35KsbDVYblDONBIQ1OqySLKCdyAwuRhab3 1/Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YSPsTBUp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6-v6si7735270plm.312.2018.02.19.03.32.33; Mon, 19 Feb 2018 03:32:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YSPsTBUp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752674AbeBSLb3 (ORCPT + 99 others); Mon, 19 Feb 2018 06:31:29 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:53868 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752389AbeBSLb1 (ORCPT ); Mon, 19 Feb 2018 06:31:27 -0500 Received: by mail-wm0-f41.google.com with SMTP id t74so14562932wme.3; Mon, 19 Feb 2018 03:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=NZ7KK0KC+DjZfqODfqY7aKxiAeF7hUjiYHaF7YT+0NI=; b=YSPsTBUp7lMqSGD1TpQATyXeTWog0LzNDvh7ux5Vrp9TT9XxxYL5VIwiY7Z+Vskw0y hi9jKmoYKOEw14gee+RH18cNKlGPLtgQ8abXqDBlEYAIF3iIinbX9t8LV+Mf3Lju+Atq DumP/Fa9klj4Rd1eaL0JmLVUmBeY925pu2dpgSFltQx9yavZYJyDkG2GgygcxMnltToL ByzgD6kIIblCZzQ3OtVgsuuhqcLJkizw3xdfUcMPKPx2vB3hS1OjaNZJX6HLQRbg9ink GIWmDPMcd4ajuHjqlib/MpzODcAaY5SGilbazrbrWEcqZLOY4vGFEcTaP0EI885V4QGa +RYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=NZ7KK0KC+DjZfqODfqY7aKxiAeF7hUjiYHaF7YT+0NI=; b=olRE3hh+IMZQLQmujTE6FPO+o8gwLmSRHNIEGSsbTeqDXmv6rYFwJcV+T2//l2o5ky UNlatgVlDlYHE0rdb3mvAxNbbWG7KUXa+x5moMYg5hXzbMYJjeJJXcObhPnwDVvHiRDv b5uIqOkXDnvhhoPcPjfEqKAFVVPZK5KKQWFFHVBrqwcdvtpQ4MNwLmPfCbm6DfUb4BQ+ ldmrIZzilRIuCRH5mar8OfZAz1vpc8whcsBnyhIgjXLIWKndqHG4KcjzI0DITgQm2mL7 hq4VyYA8Hro56Zw+gUJjoCx3Wf43/netMeEP4T00H6d5xyFkpfW4mPhqZhyskB2GvhJR BAUQ== X-Gm-Message-State: APf1xPDnATMlJIjDSaxpbGSJqZjSxqtdSGpYfhuFkOeHYBqxyNCT/ZDO hpu+EvMTvnOH0oJ3WgHDWw8= X-Received: by 10.80.162.229 with SMTP id 92mr9957109edm.26.1519039886060; Mon, 19 Feb 2018 03:31:26 -0800 (PST) Received: from [192.168.1.10] ([185.9.184.158]) by smtp.gmail.com with ESMTPSA id e12sm17524626edi.29.2018.02.19.03.31.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 03:31:25 -0800 (PST) Subject: Re: 500 ms delay in time saved into RTC To: Karel Zak , Rasmus Villemoes Cc: linux-kernel@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com, util-linux@vger.kernel.org, J William Piggott References: <30ae185f-28c9-54f1-2884-4ee7801b130e@gmail.com> <34f50661-85f5-eb46-3ff7-45f0c2bb5960@prevas.dk> <20180219110328.n7yjorinjm3xxckr@ws.net.home> From: Igor Plyatov Message-ID: <0ce68f3f-fec7-1f1c-e70b-331c0752f6d6@gmail.com> Date: Mon, 19 Feb 2018 14:31:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180219110328.n7yjorinjm3xxckr@ws.net.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Karel, > Would be possible to somehow detect what is the right default setting for > --delay? I mean for example detect architecture / clock HW, etc. > > I have no problem with --delay, but it's tuning for advanced users and > HW specific stuff. It would be nice to have something more portable. > > Karel > As I understood, issue exists only at x86 platform, where MC146818-compatible RTC used. But even if you will correctly detect platform, there is no guaranty to get exactly MC146818 RTC. RTC can be other type. It even can be not single in the system. What is more or less usable is "/sys/class/rtc/rtcX/name" file, which contains driver name. For x86 and MC146818-compatible RTC its name is "rtc_cmos". And it can be used to distinguish RTC type by hwclock utility. Best wishes. -- Igor Plyatov