Re: [PATCH net-next v5 1/2] ptp: introduce Alibaba CIPU PHC driver

From: Wen Gu

Date: Mon Dec 22 2025 - 02:19:08 EST




On 2025/12/17 05:58, Jakub Kicinski wrote:
On Sun, 14 Dec 2025 22:03:57 +0800 Wen Gu wrote:
If you're suggesting creating a new subsystem, I think we should first
answer this question: why can't it be part of the current ptp subsystem,
and what are the differences between the drivers under `drivers/ptp`
and those in the new subsystem?

I can't explain it any better than I already did here:
https://lore.kernel.org/all/20251127083610.6b66a728@xxxxxxxxxx/

I talked to Thomas Gleixner (added to CC) during LPC and he seemed
open to creating a PHC subsystem for pure time devices in virtualized
environments. Please work with him and other vendors trying to
upstream similar drivers.

Hi Jakub and Thomas,

I thought about it a bit more. If we create a new clock class
(say a "ptc"), its helpers and structure would likely end up being
almost identical to the current ptp ones, since the pure phc drivers
under drivers/ptp (e.g. ptp_kvm, ptp_vmw, ptp_s390, ptp_cipu) are
implemented on top of the existing ptp helpers. That would give us
two near-identical classes, which may be confusing.

Also, changing the userspace device node for existing pure phc drivers
from /dev/ptpX to something else (e.g. /dev/ptcX) seems impractical.
The same applies to ptp_cipu, since it is already used and relies on
exposing /dev/ptpX.

Given the historical baggage, it seems better to keep using the
existing ptp framework, but separate these pure phc drivers into a
new subsystem with a dedicated directory (e.g. drivers/phc/) and a
MAINTAINERS entry, moving them out of the netdev maintenance scope.
This should also address the concern that these pure phc drivers are
not a good fit to be maintained under the networking subsystem.

If this works for you, I'll send an RFC about this.

Regards.