Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp185947rdh; Thu, 23 Nov 2023 00:32:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2Bvsaq+eJrRnpDDnTOWPcgiVRrPsrolQgwWc5PdiKJQADeGD6FaliAelLGihJOs0sqlNs X-Received: by 2002:a17:90b:33cf:b0:281:858:a086 with SMTP id lk15-20020a17090b33cf00b002810858a086mr5567320pjb.6.1700728323153; Thu, 23 Nov 2023 00:32:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700728323; cv=none; d=google.com; s=arc-20160816; b=Th2OgZlv3fpWEB0i7tfUBHIqNSrPHwSQfsG+i2SmPydS1xBqI01KkttAYLMoj5RGjF 7dkT867F2vS/AORf27K/QDKEUXIUJhTbMVYH/e29ed5IOFVSOjmuxRyt1SACV+pk/RTV 2rUTcXb+Uzr2H4a7gfWaowg8AHDuXkpx9uKC/T5jztNMzEHCevLoBrHTJ1EiNo66iDUp c7RXylAhHn3pIufy32Cd6zNIvPx3rqaO4YDRmltznRG8GHEPgeDBU/l79PnSMunWSmto E7tzocXDlQ0hrix9K/8lvEx0yIDDYvpViSeqnMQRpty30CZgoC89LgefZMNnMGZxATXm VeFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i6UMap/rI2ydYhb+yafCRa1PP8MyOv2Soxy73yxJpLk=; fh=kg9Mke2KURG97/SK/DZGbMBktl0dOqiXQ0Ppj9av3ik=; b=qbPhATuVgCiaB8pBcT3KUCRJ8mEI5+RagfUbZWO86YZWYGNwe4yM2Sfy8c8QdYxG+M CPD9AiH4vYaZ54kh5FpePvtA3djdJNfOEXSnFU5PYNYg6+cte4NbhcqGmB+3edpwBU6/ cBvpIFOf0ARA6uBSnPXUEgvWmLl35NEPiWXFmnFOB54K5rIqXf9JkW02Nz5zQWMT8sGb gySzywIjN4Kx/34TFtjgV6rFAEdN3sDVNCrOaDMlQ1hLsQq8LMOtdKeISJBmsjExlRbL 1740UUl6rcYKTXWi8YOjPMjmU8LPcaz4oW7CLqFlwlIqW/BV9q2Wv5r50eIIKiuItV9f 7bQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=p3UbL987; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id ml5-20020a17090b360500b00285494e7747si853847pjb.167.2023.11.23.00.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 00:32:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=p3UbL987; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6C4EF8316EF1; Thu, 23 Nov 2023 00:31:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344934AbjKWIbj (ORCPT + 99 others); Thu, 23 Nov 2023 03:31:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbjKWIbh (ORCPT ); Thu, 23 Nov 2023 03:31:37 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4CC2B9; Thu, 23 Nov 2023 00:31:42 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C720D240003; Thu, 23 Nov 2023 08:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700728301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i6UMap/rI2ydYhb+yafCRa1PP8MyOv2Soxy73yxJpLk=; b=p3UbL987rz6g+xFTWugAwgcElhdIH12JdApkfMHMDhO/puf08gGx3/MK7RWpzAWv8JwkX5 ON5Q85womcvX3ncJ0As/2S61P2H9fiiIARaSy1H8lNj4zhWIsX2O1RzgueB7z2t0nBH2Gb I+832pY9kRzZghUk4KHiMn23LxiiV9P2Z6SgqshaDZURhyc9TlUs9e2fT1i3bkKOTkJFXK 77VP1FRWAbWU9zIy75XqxT3HUfgS4gTdgXlXP3KSIZf+xbkTpfU2faE50OAeygVX8sLDi4 tz7j9KE6H9p9OVXGk9aNMqgv0uCQCQKztX7QzdmHVPes99bExyijPnMRIfjicw== Date: Thu, 23 Nov 2023 09:31:40 +0100 From: Alexandre Belloni To: Mario Limonciello Cc: Mateusz =?utf-8?Q?Jo=C5=84czyk?= , Alessandro Zummo , "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" , open list , linux-pm@vger.kernel.org, tobrohl@gmail.com, aalsing@gmail.com, Dhaval.Giani@amd.com, xmb8dsv4@gmail.com, x86@kernel.org, dhaval.giani@gmail.com Subject: Re: [PATCH v2 0/4] Extend time to wait for UIP for some callers Message-ID: <20231123083140e5e75ba2@mail.local> References: <20231120141555.458-1-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231120141555.458-1-mario.limonciello@amd.com> X-GND-Sasl: alexandre.belloni@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 23 Nov 2023 00:31:59 -0800 (PST) On 20/11/2023 08:15:51-0600, Mario Limonciello wrote: > A number of users have reported their system will have a failure reading > the RTC around s2idle entry or exit. > > This failure manifests as UIP clear taking longer than 10ms. > > By a debugging patch provided by Mateusz Jończyk it is shown that this > has taken upwards of 300ms in some cases. > > This series adjusts the UIP timeout to be configurable by the caller and > changes some callers which aren't called in an interrupt context to allow > longer timeouts. > > Mario Limonciello (4): > rtc: mc146818-lib: Adjust failure return code for mc146818_get_time() > rtc: Adjust failure return code for cmos_set_alarm() > rtc: Add support for configuring the UIP timeout for RTC reads > rtc: Extend timeout for waiting for UIP to clear to 1s > > arch/alpha/kernel/rtc.c | 2 +- > arch/x86/kernel/hpet.c | 2 +- > arch/x86/kernel/rtc.c | 2 +- Please also copy the x86 maintainers so they know I'm going to carry patches that may affect them (which I doubt will cause any issues) > drivers/base/power/trace.c | 2 +- > drivers/rtc/rtc-cmos.c | 10 ++++----- > drivers/rtc/rtc-mc146818-lib.c | 37 +++++++++++++++++++++++++--------- > include/linux/mc146818rtc.h | 3 ++- > 7 files changed, 39 insertions(+), 19 deletions(-) > > > base-commit: 98b1cc82c4affc16f5598d4fa14b1858671b2263 > -- > 2.34.1 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com