linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: "Manivannan Sadhasivam" <manivannan.sadhasivam@oss.qualcomm.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Saravana Kannan" <saravanak@google.com>,
	linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	"Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>,
	"Brian Norris" <briannorris@chromium.org>
Subject: Re: [PATCH 4/6] PCI: of: Add an API to get the BDF for the device node
Date: Tue, 26 Aug 2025 08:12:53 -0500	[thread overview]
Message-ID: <CAL_Jsq+66jVM33oBCbCFjcZdd+veA-QKQRtG9iD6PP+8Bq7-Ug@mail.gmail.com> (raw)
In-Reply-To: <jqgvw3u6lkewaz2ycjkozcfqrmdln5gacgrog4lhioazhvk5yz@3ph2z25zwqvj>

On Tue, Aug 26, 2025 at 2:15 AM Manivannan Sadhasivam <mani@kernel.org> wrote:
>
> On Mon, Aug 25, 2025 at 05:43:15PM GMT, Rob Herring wrote:
> > On Fri, Aug 22, 2025 at 07:57:41PM +0530, Manivannan Sadhasivam wrote:
> > > On Fri, Aug 22, 2025 at 08:51:47AM GMT, Rob Herring wrote:
> > > > On Tue, Aug 19, 2025 at 12:44:53PM +0530, Manivannan Sadhasivam wrote:
> > > > > Bus:Device:Function (BDF) numbers are used to uniquely identify a
> > > > > device/function on a PCI bus. Hence, add an API to get the BDF from the
> > > > > devicetree node of a device.
> > > >
> > > > For FDT, the bus should always be 0. It doesn't make sense for FDT. The
> > > > bus number in DT reflects how firmware configured the PCI buses, but
> > > > there's no firmware configuration of PCI for FDT.
> > >
> > > This API is targeted for DT platforms only, where it is used to uniquely
> > > identify a devfn. What should I do to make it DT specific and not FDT?
> >
> > I don't understand. There are FDT and OF (actual OpenFirmware)
> > platforms. I'm pretty sure you don't care about the latter.
> >
>
> Sorry, I mixed the terminologies. Yes, I did refer the platforms making use of
> the FDT binary and not OF platforms.
>
> In the DTS, we do use bus number to differentiate between devices, not just
> devfn. But I get your point, bus no other than 0 are not fixed and allocated by
> the OS during runtime or by the firmware.
>
> So how should we uniquely identify a PCIe node here, if not by BDF?

By path. Which is consistent since there is also no bus num in the unit-address.

Rob

  reply	other threads:[~2025-08-26 13:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19  7:14 [PATCH 0/6] PCI/pwrctrl: Allow pwrctrl framework to control PERST# if available Manivannan Sadhasivam via B4 Relay
2025-08-19  7:14 ` [PATCH 1/6] PCI: qcom: Wait for PCIE_RESET_CONFIG_WAIT_MS after PERST# deassert Manivannan Sadhasivam via B4 Relay
2025-08-19  7:14 ` [PATCH 2/6] PCI/pwrctrl: Move pci_pwrctrl_init() before turning ON the supplies Manivannan Sadhasivam via B4 Relay
2025-08-19  7:14 ` [PATCH 3/6] PCI/pwrctrl: Add support for toggling PERST# Manivannan Sadhasivam via B4 Relay
2025-08-27 16:32   ` Bartosz Golaszewski
2025-08-27 17:26     ` Manivannan Sadhasivam
2025-08-19  7:14 ` [PATCH 4/6] PCI: of: Add an API to get the BDF for the device node Manivannan Sadhasivam via B4 Relay
2025-08-22 13:51   ` Rob Herring
2025-08-22 14:27     ` Manivannan Sadhasivam
2025-08-25 22:43       ` Rob Herring
2025-08-26  7:15         ` Manivannan Sadhasivam
2025-08-26 13:12           ` Rob Herring [this message]
2025-08-28 13:33             ` Manivannan Sadhasivam
2025-08-19  7:14 ` [PATCH 5/6] PCI: qcom: Parse PERST# from all PCIe bridge nodes Manivannan Sadhasivam via B4 Relay
2025-08-27 16:34   ` Bartosz Golaszewski
2025-08-27 17:27     ` Manivannan Sadhasivam
2025-08-27 19:48       ` Bartosz Golaszewski
2025-08-19  7:14 ` [PATCH 6/6] PCI: qcom: Allow pwrctrl core to toggle PERST# for new DT binding 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=CAL_Jsq+66jVM33oBCbCFjcZdd+veA-QKQRtG9iD6PP+8Bq7-Ug@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=brgl@bgdev.pl \
    --cc=briannorris@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krishna.chundru@oss.qualcomm.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=saravanak@google.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;
as well as URLs for NNTP newsgroup(s).