[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874jmlza3v.wl-maz@kernel.org>
Date: Mon, 03 Jul 2023 09:13:08 +0100
From: Marc Zyngier <maz@...nel.org>
To: Peter Hilber <peter.hilber@...nsynergy.com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Mark Rutland <mark.rutland@....com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC PATCH 4/7] clocksource: arm_arch_timer: Export counter type, clocksource
On Fri, 30 Jun 2023 18:10:47 +0100,
Peter Hilber <peter.hilber@...nsynergy.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.
Powered by blists - more mailing lists