[RFC PATCH v3 6/7] virtio_rtc: Add Arm Generic Timer cross-timestamping

David Woodhouse dwmw2 at infradead.org
Sat Jun 15 00:50:53 PDT 2024


On Mon, 2023-12-18 at 08:38 +0100, Peter Hilber wrote:
> 
> +int viortc_hw_xtstamp_params(u16 *hw_counter, enum clocksource_ids *cs_id)
> +{
> +       *hw_counter = VIRTIO_RTC_COUNTER_ARM_VIRT;

Hm, but what if it isn't? I think you need to put this in
drivers/clocksource/arm_arch_timer.c where it can do something like
kvm_arch_ptp_get_crosststamp() does to decide:

        if (arch_timer_uses_ppi == ARCH_TIMER_VIRT_PPI)
                ptp_counter = KVM_PTP_VIRT_COUNTER;
        else
                ptp_counter = KVM_PTP_PHYS_COUNTER;


> +       *cs_id = CSID_ARM_ARCH_COUNTER;
> +
> +       return 0;
> +}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5965 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240615/71f35bb0/attachment.p7s>


More information about the linux-arm-kernel mailing list