From: Wen Gu <guwen@linux.alibaba.com>
To: David Woodhouse <dwmw2@infradead.org>,
richardcochran@gmail.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: svens@linux.ibm.com, nick.shi@broadcom.com,
ajay.kaher@broadcom.com, alexey.makhalov@broadcom.com,
bcm-kernel-feedback-list@broadcom.com,
linux-s390@vger.kernel.org, xuanzhuo@linux.alibaba.com,
dust.li@linux.alibaba.com, mani@kernel.org,
imran.shaik@oss.qualcomm.com
Subject: Re: [PATCH v3 0/2] ptp: split non-host-disciplined PHC drivers into a dedicated subdirectory
Date: Wed, 1 Jul 2026 20:08:30 +0800 [thread overview]
Message-ID: <1d250249-78bd-4df5-9312-4ee64340ea97@linux.alibaba.com> (raw)
In-Reply-To: <14969e704fb8e70deb549b2e1c8670f6756a8da7.camel@infradead.org>
On 2026/6/30 18:57, David Woodhouse wrote:
> On Tue, 2026-06-30 at 11:15 +0800, Wen Gu wrote:
>
> I was thinking we'd move them to drivers/phc, and simplify them as we do.
>
> Most of them are just a lot of PTP driver boilerplate, wrapping around
> one central function like
>
> static int vmclock_get_crosststamp(struct vmclock_state *st,
> struct ptp_system_timestamp *sts,
> struct system_counterval_t *system_counter,
> struct timespec64 *tspec)
>
> ...which is called with different permutations of arguments depending
> on the actual PTP call.
>
> I was thinking of reducing the duplication and having the PHC drivers
> provide *only* that central function. Let the common PHC code provide
> the interface to PTP (as well as to core timekeeping, for setting the
> clock at boot, for timekeeping_set_reference() in the vmclock case, and
> perhaps even for a PPS-like discipline from other clocks).
>
> Here's a *very* hastily thrown together proof of concept; utterly
> untested and AI-produced, and I've only given it the bare minimum of
> oversight thus far (I have been meaning to do this for weeks but other
> things have taken precedence so far)...
>
> https://git.infradead.org/?p=linux-phc.git;a=shortlog;h=refs/heads/next
Thanks for the POC. I've looked over it and agree this is a cleaner
approach overall. The v3 was meant as an interim step, but given the POC
it makes more sense to go straight to drivers/phc.
I'm happy to adapt the Alibaba CIPU PHC driver to the new framework
once it's in place, and glad to help along the way if needed.
prev parent reply other threads:[~2026-07-01 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 3:15 [PATCH v3 0/2] ptp: split non-host-disciplined PHC drivers into a dedicated subdirectory Wen Gu
2026-06-30 3:15 ` [PATCH v3 1/2] ptp: move non-host-disciplined clock " Wen Gu
2026-06-30 3:15 ` [PATCH v3 2/2] MAINTAINERS: update PTP maintainer entries after directory split Wen Gu
2026-06-30 10:57 ` [PATCH v3 0/2] ptp: split non-host-disciplined PHC drivers into a dedicated subdirectory David Woodhouse
2026-07-01 12:08 ` Wen Gu [this message]
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=1d250249-78bd-4df5-9312-4ee64340ea97@linux.alibaba.com \
--to=guwen@linux.alibaba.com \
--cc=ajay.kaher@broadcom.com \
--cc=alexey.makhalov@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=dwmw2@infradead.org \
--cc=edumazet@google.com \
--cc=imran.shaik@oss.qualcomm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mani@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nick.shi@broadcom.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=svens@linux.ibm.com \
--cc=xuanzhuo@linux.alibaba.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.