lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+66jVM33oBCbCFjcZdd+veA-QKQRtG9iD6PP+8Bq7-Ug@mail.gmail.com>
Date: Tue, 26 Aug 2025 08:12:53 -0500
From: Rob Herring <robh@...nel.org>
To: Manivannan Sadhasivam <mani@...nel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>, 
	Lorenzo Pieralisi <lpieralisi@...nel.org>, Krzysztof Wilczyński <kwilczynski@...nel.org>, 
	Bjorn Helgaas <bhelgaas@...gle.com>, Bartosz Golaszewski <brgl@...ev.pl>, 
	Saravana Kannan <saravanak@...gle.com>, linux-pci@...r.kernel.org, 
	linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	devicetree@...r.kernel.org, 
	Krishna Chaitanya Chundru <krishna.chundru@....qualcomm.com>, Brian Norris <briannorris@...omium.org>
Subject: Re: [PATCH 4/6] PCI: of: Add an API to get the BDF for the device node

On Tue, Aug 26, 2025 at 2:15 AM Manivannan Sadhasivam <mani@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ