Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40C42E83EF5 for ; Wed, 4 Feb 2026 09:00:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1220238.1528945 (Exim 4.92) (envelope-from ) id 1vnYkE-0006iZ-UY; Wed, 04 Feb 2026 09:00:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1220238.1528945; Wed, 04 Feb 2026 09:00:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vnYkE-0006iS-RZ; Wed, 04 Feb 2026 09:00:18 +0000 Received: by outflank-mailman (input) for mailman id 1220238; Wed, 04 Feb 2026 09:00:17 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vnYkD-0006iM-AD for xen-devel@lists.xenproject.org; Wed, 04 Feb 2026 09:00:17 +0000 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [2a00:1450:4864:20::32c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ec2b4999-01a7-11f1-b161-2bf370ae4941; Wed, 04 Feb 2026 10:00:16 +0100 (CET) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-47ee07570deso55144155e9.1 for ; Wed, 04 Feb 2026 01:00:16 -0800 (PST) Received: from [192.168.1.6] (user-109-243-67-101.play-internet.pl. [109.243.67.101]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4830ec5cc24sm21961265e9.3.2026.02.04.01.00.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Feb 2026 01:00:14 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ec2b4999-01a7-11f1-b161-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770195615; x=1770800415; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=r3eOJqHhjKxDuoHkcfX76ycl2IVwyQ77rcRwoU2Q/dg=; b=klSweW+EuawpBfiRIuvqaiQv3TeWKOIQbxszI9l1Mg6BtyCfh7ISllPE1vYPNchaFF q+TXFXeJ0wEYBGPgWZXldh7wNRfqblLnOSAqNWNeoPgTt1zEARZEvAGRCV/0Gx5/oVy6 LR6XcV/e1paqqotxikTwseOrIljjR/z/WkSCs6vZ/fzRf67kI+bsKTrpjuCImw7mIYw2 TALtAu00iHsG609sspF1U5cogwR9ych4AxqUXPTRo/nYUUo9hdvQB8qoMT5rVySG3j5d tScADgiZrCNQRr8a9ozi+Wd1DBMj44Uit/mwQblXDJRifcfBT4phbS5/pj6aMmpBc/wF tdrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770195615; x=1770800415; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r3eOJqHhjKxDuoHkcfX76ycl2IVwyQ77rcRwoU2Q/dg=; b=pN34GInjfHpi+3O9XwFrf4cZkbPEPPklvRUCoda+A8wUxCoe5DO3xLBR2qOAA5HTTH 9lWBkRcaPZYc5yhoUrFRU37aTqFcQPtjF5gdVoPU2jpagLFxCOcpVIFLAHeyRc8KdHFZ qgDbvNRtEp0makTSItD828ng36D1iQUlYY3cE0kEWo87Y3Ii8LnCNexYb49Q4WzBk+BR Ik/Ta1NyDXxV1XUDJ9osL/yPf3lqzNXxjbdxlIwScjK6itzyZZ50AIdJpyvLZpyPfqD+ 9gBEoe3zQQpUICNxi+v6TimvpmsaOUz1i66O+N7SKlwoSe+ErMglwyJIHwGGJGdnBh5C TeXg== X-Forwarded-Encrypted: i=1; AJvYcCXMfSrG1Lcq176YpyaNRL2X/wZ1FLm1k7Bu22i9wz98N44KaLygd4zblJew/p0nk3DnhoaBYJdp2G8=@lists.xenproject.org X-Gm-Message-State: AOJu0Yxle3tM9B/7JkJbcRh2ltg7KXMGRgybhAwRg41zAbxLAJF8qxiW f4lAXOlkVjWrUcZ5+t+djENvemAd4ArPU4JIsEiCHiX9f1rN+k0lH5LX X-Gm-Gg: AZuq6aLSjCP3FJTu5R2JERnio5PE7Odk0U6xZfzja0PZJygPby2wIpJLRqN827ooQY9 lfo6EXZZrhS4GWHTzWpX+kI9mZCZRqDQB1m1Px2WAPm/x0pQi2KrzcGA8H2IGeL25AGSvsIStsd HB/0cYbtu5Tlggkn0UCWUVLHedGqwSzAyU3TisBM+GepEPI7FLqzvNTM0DbczVe4SafHjBEfYRz H+Ce55eWaiLfESF1bNG4NJU3dOzmLqyF+/TrbYp6vJ7RpG/1Lh5mQiFtrHtyRRSMSrRAxiXbxMZ jkweW/BxaoMzqzz1xnqvMRjprvSvAjGDOAOqVKVbi6RnwCIvdJ2BYxsBWHPhMTYN5uQJRx26rOz VORoQquhNJci+g8EbQ1Vq1Ui0dNHkyruDMoABYpvyqjallg+ueSYDXmZl5ctgdUY3aCJXfrIkLj Bx62NnprF3Ek2MO9ycAZq2GMifnBj3yXnoB6l6w+LeB95NTmHo37HeLbvJK/HOPT+vWdOJmdKY/ Q== X-Received: by 2002:a05:600c:19cd:b0:477:2f7c:314f with SMTP id 5b1f17b1804b1-4830e94c659mr29031495e9.10.1770195614516; Wed, 04 Feb 2026 01:00:14 -0800 (PST) Message-ID: Date: Wed, 4 Feb 2026 10:00:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 06/16] xen/time: move ticks<->ns helpers to common code To: Jan Beulich Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Alistair Francis , Connor Davis , Romain Caritey , xen-devel@lists.xenproject.org References: <2ff79945-f972-49ae-b50a-a7bbff9d4aa9@suse.com> Content-Language: en-US From: Oleksii Kurochko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/4/26 9:13 AM, Jan Beulich wrote: > On 29.01.2026 09:48, Jan Beulich wrote: >> On 22.01.2026 17:47, Oleksii Kurochko wrote: >>> ticks_to_ns() and ns_to_ticks() are not architecture-specific, so provide a >>> common implementation that is more resilient to overflow than the historical >>> Arm version. This is not a practical issue for Arm, as the latest ARM ARM >>> that timer frequency should be fixed at 1 GHz and older platforms used much >>> lower rates, which is shy of 32-bit overflow. As the helpers are declared >>> as static inline, they should not affect x86, which does not use them. >>> >>> On Arm, these helpers were historically implemented as out-of-line functions >>> because the counter frequency was originally defined as static and unavailable >>> to headers [1]. Later changes [2] removed this restriction, but the helpers >>> remained unchanged. Now they can be implemented as static inline without any >>> issues. >>> >>> Centralising the helpers avoids duplication and removes subtle differences >>> between architectures while keeping the implementation simple. >>> >>> Drop redundant includes where already pulls it in. >>> >>> No functional change is intended. >>> >>> [1] ddee56dc2994 arm: driver for the generic timer for ARMv7 >>> [2] 096578b4e489 xen: move XEN_SYSCTL_physinfo, XEN_SYSCTL_numainfo and >>> XEN_SYSCTL_topologyinfo to common code >>> >>> Signed-off-by: Oleksii Kurochko >>> Suggested-by: Jan Beulich >> Nit: Flip the two (chronological order). >> >> Reviewed-by: Jan Beulich > Btw, if this got the necessary Arm ack, I think it could also go in ahead of > all earlier patches in the series? Yes, it is independent from earlier patches in the series. ~ Oleksii