linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Peter Hilber <peter.hilber@opensynergy.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC PATCH 4/7] clocksource: arm_arch_timer: Export counter type, clocksource
Date: Mon, 03 Jul 2023 09:13:08 +0100	[thread overview]
Message-ID: <874jmlza3v.wl-maz@kernel.org> (raw)
In-Reply-To: <20230630171052.985577-5-peter.hilber@opensynergy.com>

On Fri, 30 Jun 2023 18:10:47 +0100,
Peter Hilber <peter.hilber@opensynergy.com> 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

  reply	other threads:[~2023-07-03  8:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 17:10 [RFC PATCH 0/7] Add virtio_rtc module and related changes Peter Hilber
2023-06-30 17:10 ` [RFC PATCH 4/7] clocksource: arm_arch_timer: Export counter type, clocksource Peter Hilber
2023-07-03  8:13   ` Marc Zyngier [this message]
2023-07-27 10:22     ` Peter Hilber
2023-07-28  8:11       ` Marc Zyngier
2023-07-31 16:15         ` Peter Hilber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jmlza3v.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peter.hilber@opensynergy.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).