Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: manivannan.sadhasivam@linaro.org
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 1/3] PCI: Add sysfs support for exposing PTM context
Date: Mon, 24 Mar 2025 11:28:54 -0500	[thread overview]
Message-ID: <20250324162854.GA1251469@bhelgaas> (raw)
In-Reply-To: <20250324-pcie-ptm-v2-1-c7d8c3644b4a@linaro.org>

On Mon, Mar 24, 2025 at 03:34:35PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> 
> Precision Time Management (PTM) mechanism defined in PCIe spec r6.0,
> sec 6.22 allows precise coordination of timing information across multiple
> components in a PCIe hierarchy with independent local time clocks.
> 
> PCI core already supports enabling PTM in the root port and endpoint
> devices through PTM Extended Capability registers. But the PTM context
> supported by the PTM capable components such as Root Complex (RC) and
> Endpoint (EP) controllers were not exposed as of now.
> 
> Hence, add the sysfs support to expose the PTM context to userspace from
> both PCIe RC and EP controllers. Controller drivers are expected to call
> pcie_ptm_create_sysfs() to create the sysfs attributes for the PTM context
> and call pcie_ptm_destroy_sysfs() to destroy them. The drivers should also
> populate the relevant callbacks in the 'struct pcie_ptm_ops' structure
> based on the controller implementation.

Can we include some motivation here, e.g., what is the value of
exposing this information?  Is this for debugging or bringup purposes?
Can users or administrators use this for something?  Obviously they
can read and update some internal PTM state, but it would be nice to
know what that's good for.

It looks like this requires device-specific support, i.e., the context
itself, context update modes, access to the clock values, etc., is not
specified by the generic PCIe spec.  Consequently this probably can't
be done by generic drivers like ACPI, and maybe this is a candidate
for debugfs instead of sysfs.

The merge window is open now, so this will be v6.16 material, so no
hurry about updating before v6.15-rc1.

Bjorn

  parent reply	other threads:[~2025-03-24 16:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-24 10:04 [PATCH v2 0/3] PCI: Add PTM sysfs support Manivannan Sadhasivam via B4 Relay
2025-03-24 10:04 ` [PATCH v2 1/3] PCI: Add sysfs support for exposing PTM context Manivannan Sadhasivam via B4 Relay
2025-03-24 13:01   ` Ilpo Järvinen
2025-04-07  7:36     ` Manivannan Sadhasivam
2025-03-24 16:28   ` Bjorn Helgaas [this message]
2025-04-07  7:44     ` Manivannan Sadhasivam
2025-04-07 16:53       ` Bjorn Helgaas
2025-03-26 21:18   ` kernel test robot
2025-03-24 10:04 ` [PATCH v2 2/3] PCI: dwc: Add sysfs support for " Manivannan Sadhasivam via B4 Relay
2025-03-24 14:06   ` kernel test robot
2025-03-26 21:42   ` kernel test robot
2025-03-24 10:04 ` [PATCH v2 3/3] PCI: qcom-ep: Mask PTM_UPDATING interrupt Manivannan Sadhasivam via B4 Relay

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=20250324162854.GA1251469@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=jingoohan1@gmail.com \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    /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