Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25841995rwd; Mon, 3 Jul 2023 01:36:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlFzHMomQ332//bxwMR6c+kBfBopCWDR6mSOsIivwGTes9NPodqzMNd5ipUQ9c64F7YQh6/u X-Received: by 2002:a05:6871:8791:b0:1b0:5bf7:3bb6 with SMTP id td17-20020a056871879100b001b05bf73bb6mr10044766oab.28.1688373411297; Mon, 03 Jul 2023 01:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688373411; cv=none; d=google.com; s=arc-20160816; b=0nnQ3Mj/aYyGMadP70I1GMUABgDsKu7SGbhA1v5XURujeRcMP3FdUDe+ObTMwuH621 llKdU6ZbpSf/M3kZzmq+W6qZgdTJ4LlrUrEq9hRX3QgBA3Sq3b/E/UFnmweuXxBeE+53 25YA7tJ1qQpcChZN0RgDrCu52vrRUBh/3L0Vxz6rzxHb6CbMEOjb3ALOp0qfaPevIz4V qJI1eiJ+fF4YsR8v/4o4DcRrFg5wiDLx8ZHSPfoCh3hNVM98sJM2Bi6xiMux/rfxcreY Cs8Iv/eoEGwEQ+jXMRTgwY8PYrX1M9DzFyprRv/CK6Z/WvaNSP7euadYsqRi+Q0zJ+L2 FckQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=Qg91tWC9OALeUIxisK0JGs8F7HOE9NNa+Yye/s18r5A=; fh=RN0OJYk+USEJ2oYfv1T8DVZrc/u6dJebHc4kRMmf6Zk=; b=0RBQP81rW8a6QWMafKdWOVPhZHJ2ivz6J8iCDgsa7s9tv6SAtH3KfKZ5m/1H3ycFVO +RF7d+/CRWrGKuKz4sU0IzKeajtHUdPOlt1WWmeIesldTy0RDC+LaGZ2C0vqjbfSRdNZ XQtDlt1QWyOr7DJZFvq4hrnm3bZ7fgH4/thNbm9PQtLc+gbB9WQ533O7Ookqg9PBMOMc hSB/5KEL014OY3pterSppEkQwJtia3f5NEufjZkpJuedZKhP1M07hiZXA3Y6Mls4TGq9 u2bMyiCewQAZ5jkiehMK+hiBZRoO7wWwSvrOAaQMmHXqDmmT3QR1OKUADcZxKHT0JtES QwsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oBiI8Nrj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a64-20020a639043000000b005538aedccecsi18616804pge.565.2023.07.03.01.36.38; Mon, 03 Jul 2023 01:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oBiI8Nrj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231324AbjGCINS (ORCPT + 99 others); Mon, 3 Jul 2023 04:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbjGCINK (ORCPT ); Mon, 3 Jul 2023 04:13:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76B79C5 for ; Mon, 3 Jul 2023 01:13:09 -0700 (PDT) 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 1552260DF9 for ; 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") Content-Type: text/plain; charset=US-ASCII 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.