Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: James Clark <jjc@jclark.com>
Cc: netdev-bot+sashiko@kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, richardcochran@gmail.com, krzk+dt@kernel.org,
	conor+dt@kernel.org, lee@kernel.org, s-vadapalli@ti.com,
	rogerq@kernel.org, bigeasy@linutronix.de,
	martin.kaistra@linutronix.de, vadim.fedorenko@linux.dev,
	r-sharma3@ti.com, robertcnelson@gmail.com, nm@ti.com,
	vigneshr@ti.com, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, mfd@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next 3/3] net: ethernet: ti: am65-cpts: implement PTP_SYS_OFFSET_PRECISE
Date: Thu, 19 Nov 2026 17:06:14 -0600	[thread overview]
Message-ID: <20261119230614.GA1147583-robh@kernel.org> (raw)
In-Reply-To: <20261117004133.1594972-1-jjc@jclark.com>

On Tue, Nov 17, 2026 at 07:41:33AM +0700, James Clark wrote:
> > [Severity: Medium]
> > Is it safe for this driver to own the EXPBIT_SEL field of GTC_CFG0_PUSHEVT?
> >
> > The register belongs to the SoC-wide GTC, not to the CPTS.
> > am65_cpts_ptp_getcrosststamp() rewrites it on every PTP_SYS_OFFSET_PRECISE
> > request. The previous value is never saved or restored, on success or on
> > error.
> [ ... ]
> > Suppose one of those consumers expects a different exported bit.
> 
> There is no other user in the tree currently. If in the future something
> else in the kernel wants to use it, then the solution would be a small
> driver to mediate this. If there is a user outside the kernel, I am not
> sure what you would have me do about it.

Would doing this imply a DT change? If so, your binding is not future 
proof.

> 
> > [Severity: Medium]
> > Should val be checked here, to confirm that EXPBIT_SEL now reads back as
> > AM65_CPTS_GTC_PUSH_BIT?
> 
> I agree this would be an improvement and I will do this in v2.
> 
> > [Severity: Medium]
> > Should a failed syscon lookup be fatal here? A bad index just below only
> > logs an error and leaves the feature disabled.
> 
> A ti,gtc-push phandle that doesn't resolve to a syscon is a broken
> device tree, so failing the probe is right, and it lets -EPROBE_DEFER
> through.

Not the kernel's job to validate the DT. If something in DT is optional, 
then whether it is missing or wrong doesn't really matter.

> 
> [ ... ]
> > With CONFIG_MFD_SYSCON=n, the syscon stub returns ERR_PTR(-ENOTSUPP). Any
> > DT with ti,gtc-push would then stop Ethernet from probing.
> 
> MFD_SYSCON cannot be off here: TI_K3_AM65_CPTS depends on ARCH_K3,
> which selects TI_K3_SOCINFO, which selects MFD_SYSCON.

Is that true for *every* kernel version? Again, better user experience 
IMO to just warn if something is missing and continue on enabling 
whatever you can.

Rob


      reply	other threads:[~2026-11-19 23:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  4:24 [PATCH net-next 0/3] net: ethernet: ti: am65-cpts: add PTP_SYS_OFFSET_PRECISE support James Clark
2026-11-10  4:24 ` [PATCH net-next 1/3] dt-bindings: mfd: syscon: add ti,am654-gtc James Clark
2026-11-12  7:25   ` netdev-bot+sashiko
2026-11-13 10:44   ` Krzysztof Kozlowski
2026-11-19 18:52   ` (subset) " Lee Jones
2026-11-10  4:24 ` [PATCH net-next 2/3] dt-bindings: net: ti,k3-am654-cpts: add ti,gtc-push James Clark
2026-11-10  4:24 ` [PATCH net-next 3/3] net: ethernet: ti: am65-cpts: implement PTP_SYS_OFFSET_PRECISE James Clark
2026-11-12  7:25   ` netdev-bot+sashiko
2026-11-17  0:41     ` James Clark
2026-11-19 23:06       ` Rob Herring [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=20261119230614.GA1147583-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bigeasy@linutronix.de \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=jjc@jclark.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.kaistra@linutronix.de \
    --cc=mfd@lists.linux.dev \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pabeni@redhat.com \
    --cc=r-sharma3@ti.com \
    --cc=richardcochran@gmail.com \
    --cc=robertcnelson@gmail.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=vigneshr@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox