From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 70E9AEB64DD for ; Mon, 3 Jul 2023 08:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xCtcTUG2sMtNW3jrexunNHfayA5qH8EoAHzAbiBsZmM=; b=NV/Z4Xe09wpZfK wqMEU0SoGCpIlHqYlREw4zH6DRnFk0DdDEuYGwTpLefkeffPfa2OdUeAIdr4iES+G/e59huCdVlsb Wa/KnNhMEWwcvriUvFhMoxMSIpGS0Wz649DNnD2pP8J2JQ4ofsnToBLYohUSy+A/jFLFU7W8gXlh7 4q2SpINRCiRibZKVmR8GWMGGDxCZznjPCY8RDoscI2ZFyVzObg4Nggyo0jsq/lRrTKAijXbR0NC11 WypXyjq0o6siexckjpFpcVV/LTKxIpOSVP/1Do1lhapAxe07OJJSqW25O4beZFuIvPUva7wxC/Znh 6iVRn+b+0g0MPcZSUBAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qGEgK-009i99-2W; Mon, 03 Jul 2023 08:13:12 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGEgH-009i7m-1b for linux-arm-kernel@lists.infradead.org; Mon, 03 Jul 2023 08:13:10 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1119960DF8; Mon, 3 Jul 2023 08:13:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 798FBC433C7; Mon, 3 Jul 2023 08:13:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688371988; bh=/vatCFORHYkaQFYtyLbCwu4ix9oMWfI+Li1VdAnUU3o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oBiI8NrjjU8PbF7V9kCV3IUMgxAzPMSy6GwvSYjepshFJQ5wzNG8gx0J6QTtYXni8 j1YaqPAJzk+FdnTSQJSFEdupfSH4ZRo1o7hJUMT5qjROyA9EXorTh2NbCQawBPAhq2 /Qq9r9UjERcejltGkOkADl9i1155VsDc0jyuueLSyO6j7/LDss9CVeQmx4vG37/cw6 BCX1h6BNiimEWDmGqbWBm5a49bRriZhgFahA+bkfL5mB3wRaPGN8qDVTRdGg4MhPXq htxf0cO95fqFhw8H4UFaX8cTRFNmH850AeWOYtA+snOwp14VJEBtItpc7Q75bL2oxR QQemVWdArUCZg== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qGEgE-00A6GG-D9; Mon, 03 Jul 2023 09:13:06 +0100 Date: Mon, 03 Jul 2023 09:13:08 +0100 Message-ID: <874jmlza3v.wl-maz@kernel.org> From: Marc Zyngier To: Peter Hilber Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , Daniel Lezcano , Thomas Gleixner Subject: Re: [RFC PATCH 4/7] clocksource: arm_arch_timer: Export counter type, clocksource In-Reply-To: <20230630171052.985577-5-peter.hilber@opensynergy.com> References: <20230630171052.985577-1-peter.hilber@opensynergy.com> <20230630171052.985577-5-peter.hilber@opensynergy.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: peter.hilber@opensynergy.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, daniel.lezcano@linaro.org, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230703_011309_573423_4743FB28 X-CRM114-Status: GOOD ( 21.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 30 Jun 2023 18:10:47 +0100, Peter Hilber wrote: > > Export helper functions to allow other code to > > - determine the counter type in use (virtual or physical, CP15 or memory), > > - get a pointer to the arm_arch_timer clocksource, which can be compared > with the current clocksource. > > The virtio_rtc driver will require the clocksource pointer when using > get_device_system_crosststamp(), and should communicate the actual Arm > counter type to the Virtio RTC device (cf. spec draft [1]). I really don't see why you should poke at the clocksource backend: - the MMIO clocksource is only used in PM situations, which a virtio driver has no business being involved with - only the virtual counter is relevant -- it is always at a 0-offset from the physical one when userspace has an opportunity to run So it really looks that out of the four combinations, only one is relevant. I'm not Cc'd on the rest of the series, so I can't even see in which context this is used. But as it is, the approach looks wrong. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel