From: Eric Biggers <ebiggers@kernel.org>
To: Manivannan Sadhasivam <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 v4 1/4] PCI: Add debugfs support for exposing PTM context
Date: Fri, 6 Jun 2025 19:55:06 -0700 [thread overview]
Message-ID: <20250607025506.GA16607@sol> (raw)
In-Reply-To: <20250505-pcie-ptm-v4-1-02d26d51400b@linaro.org>
On Mon, May 05, 2025 at 07:54:39PM +0530, Manivannan Sadhasivam wrote:
> Precision Time Management (PTM) mechanism defined in PCIe spec r6.0,
> sec 6.21 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 debugfs support to expose the PTM context to userspace from
> both PCIe RC and EP controllers. Controller drivers are expected to call
> pcie_ptm_create_debugfs() to create the debugfs attributes for the PTM
> context and call pcie_ptm_destroy_debugfs() to destroy them. The drivers
> should also populate the relevant callbacks in the 'struct pcie_ptm_ops'
> structure based on the controller implementation.
>
> Below PTM context are exposed through debugfs:
>
> PCIe RC
> =======
>
> 1. PTM Local clock
> 2. PTM T2 timestamp
> 3. PTM T3 timestamp
> 4. PTM Context valid
>
> PCIe EP
> =======
>
> 1. PTM Local clock
> 2. PTM T1 timestamp
> 3. PTM T4 timestamp
> 4. PTM Master clock
> 5. PTM Context update
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> Documentation/ABI/testing/debugfs-pcie-ptm | 70 +++++++
> MAINTAINERS | 1 +
> drivers/pci/pcie/ptm.c | 300 +++++++++++++++++++++++++++++
> include/linux/pci.h | 45 +++++
> 4 files changed, 416 insertions(+)
There's a build error on mainline from this commit:
drivers/pci/pcie/ptm.c:498:25: error: redefinition of 'pcie_ptm_create_debugfs'
498 | struct pci_ptm_debugfs *pcie_ptm_create_debugfs(struct device *dev, void *pdata,
| ^
./include/linux/pci.h:1915:2: note: previous definition is here
1915 | *pcie_ptm_create_debugfs(struct device *dev, void *pdata,
| ^
drivers/pci/pcie/ptm.c:546:6: error: redefinition of 'pcie_ptm_destroy_debugfs'
546 | void pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs)
| ^
./include/linux/pci.h:1918:1: note: previous definition is here
1918 | pcie_ptm_destroy_debugfs(struct pci_ptm_debugfs *ptm_debugfs) { }
| ^
This is with CONFIG_DEBUG_FS=n && CONFIG_PCIE_PTM=y.
- Eric
next prev parent reply other threads:[~2025-06-07 2:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 14:24 [PATCH v4 0/4] PCI: Add PTM debugfs support Manivannan Sadhasivam
2025-05-05 14:24 ` [PATCH v4 1/4] PCI: Add debugfs support for exposing PTM context Manivannan Sadhasivam
2025-05-05 18:37 ` Bjorn Helgaas
2025-05-10 6:20 ` Manivannan Sadhasivam
2025-06-07 2:55 ` Eric Biggers [this message]
2025-05-05 14:24 ` [PATCH v4 2/4] PCI: dwc: Pass DWC PCIe mode to dwc_pcie_debugfs_init() Manivannan Sadhasivam
2025-05-05 18:37 ` Bjorn Helgaas
2025-05-10 6:21 ` Manivannan Sadhasivam
2025-05-05 14:24 ` [PATCH v4 3/4] PCI: dwc: Add debugfs support for PTM context Manivannan Sadhasivam
2025-06-17 23:12 ` Bjorn Helgaas
2025-06-30 20:51 ` Bjorn Helgaas
2025-05-05 14:24 ` [PATCH v4 4/4] PCI: qcom-ep: Mask PTM_UPDATING interrupt Manivannan Sadhasivam
2025-05-10 6:20 ` [PATCH v4 0/4] PCI: Add PTM debugfs support Manivannan Sadhasivam
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=20250607025506.GA16607@sol \
--to=ebiggers@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