From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.171.202.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796137503; b=QEs6u9GHM2LBkoxZz5N4rN6eMD6vVmt0hx3QSZqR1RD/FSqPwdVteL0CtIKmHHMGarkV zewlD4gjTMfH4wSXhOZj+iaULmHXO3phZxU4p5Z4Ca+t9+Mtu+85JnM/W0cI2ABQsXgYa RpYXjZ5U3huKFm0lpPb4VJ+DETEa5JUfVYovSvJrXwvpoROSMT0iUMslg5dY9BUEhYSpp TAaRQ/nuihbyH3O2vkcjIROcr3TiVq4EqwZqUrqodi+H66I5tWj8BOIOmGylvZ7OAXyXD c6Kl5KZ03JEHouTtzV139SdrxvaeQNvz7yH8BOouf5lfcVDa3gI9FwriKknbPzFlCYg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796137503; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To: X-Last-TLS-Session-Version; bh=ltccIoNwnM77RxULnEzPFXtfwC0nVt7Cx47iknkvwdw=; b=hp3ONKnDxditTagm/8yjNJfM/at2AxDKL1PFWINNDrzswmEc/6F/B5p/uzRuX136QrpP m6FSINHJqDOhavBeQbl6t+21h01NsHkfdxxp+sV6CbEd6ixHFUW8HzLOOJWmLYo/kOuGJ HxNTMa7I3OEBitmTrVWVlzBci6wI3EaRFrNVlKNhytWzg5WSIqBhw964u3/6mbj1b+t5e LZp3bO3Uhp7qNuPbmWIGKF93QAzqsbUItSNP05Tq+u9QhVzBWlFBKNjij4xamV1CAWa9I skIJb37XFBzG6G4Xs6rTU5wZ6Gw79N+EAQBDGyVH7jJKBvgP9Gj07pn0LWbTSaIP99A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b="FCt/RytD"; arc=none smtp.remote-ip=185.171.202.116 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B394606A31A for ; Tue, 1 Dec 2026 15:05:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9B394606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=FCt/RytD Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id F3BB0C2B9CB; Tue, 1 Dec 2026 15:05:04 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 613C7603CB; Tue, 1 Dec 2026 15:04:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0A99611EA2657; Tue, 01 Dec 2026 16:04:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796137489; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ltccIoNwnM77RxULnEzPFXtfwC0nVt7Cx47iknkvwdw=; b=FCt/RytDMJeNC59+3XKJWFzxUmA9uGeoibmfv1GCIiu/Zntzu8VQnhGcYW7cvK13pDh/Q6 mx9Zk5aZl3syjuyOctJYkhRVMOWpkYM8z9+7xiQXvwYGeAn0x27RbYQbrvop2PnObcfVQK xumaXU56XXmuVFnFghGy3nsc0pGx9um7we9pNttlQhMPkDOmD1X7Q1jLNPgWCz0U6dDn3N 274VoXxYBWVIOL9vg8fBrxnuQcvt/A69XTAaVaVrq1/8Pk4sFF5W8sAWJrivXiAgADuP8f LVZyFZGN76f9KmnyQHuQTR1QIpZ1hYcYd2uBe0f5q11yX1nIGPr4lB4n8R3HtQ== Date: Tue, 1 Dec 2026 16:04:47 +0100 From: Alexandre Belloni To: Thomas =?iso-8859-1?Q?Wei=DFschuh_=28Schneider_Electric=29?= Cc: John Stultz , Thomas Gleixner , Stephen Boyd , Miroslav Lichvar , Cassio Neri , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Subject: Re: [PATCH v3 3/4] rtc: lib: Implement rtc_time64_to_tm() in terms of time64_to_tm() Message-ID: <20261201150447766c968f@mail.local> References: <20261130-time-time64-to-tm-v3-0-f68748ad4118@linutronix.de> <20261130-time-time64-to-tm-v3-3-f68748ad4118@linutronix.de> <20261130202232ce193cec@mail.local> <20261201100019-fbb75e1d-0447-44b9-bcd4-b46c0df1a64e@linutronix.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20261201100019-fbb75e1d-0447-44b9-bcd4-b46c0df1a64e@linutronix.de> X-Last-TLS-Session-Version: TLSv1.3 On 01/12/2026 10:05:36+0100, Thomas Weißschuh (Schneider Electric) wrote: > On Mon, Nov 30, 2026 at 09:22:32PM +0100, Alexandre Belloni wrote: > > On 30/11/2026 15:20:49+0100, Thomas Weißschuh (Schneider Electric) wrote: > > > The core timekeeping code already provides a function to convert seconds > > > since the epoch to a 'struct tm'. This can be reused for a the > > > 'struct rtc_time' conversion. > > > > > > time64_to_tm() can handle a larger range of dates. It is also > > > 20% slower, but this function is not a hot-path anyways. > > > On the other hand this saves ~600 bytes of .text. > > > > > > > While not in the hot path, this is actually time sensitive which is why > > I always hesitated doing this change. > > time64_to_tm() has been optimized by Cassio recently. > So the absolute performance should be much better than the original > rtc_time64_to_tm(). > Well, rtc_time64_to_tm was also optimized so I don't get your point here. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com