devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 06/14] PCI: endpoint: Assign PCI domain number for endpoint controllers
Date: Tue, 16 Jul 2024 09:44:16 +0530	[thread overview]
Message-ID: <20240716041416.GC3446@thinkpad> (raw)
In-Reply-To: <5ea6d478-f2da-4b68-8987-79cc5dfb8c86@linaro.org>

On Mon, Jul 15, 2024 at 10:02:18PM +0200, Konrad Dybcio wrote:
> On 15.07.2024 7:33 PM, Manivannan Sadhasivam via B4 Relay wrote:
> > From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > 
> > Right now, PCI endpoint subsystem doesn't assign PCI domain number for the
> > PCI endpoint controllers. But this domain number could be useful to the EPC
> > drivers to uniquely identify each controller based on the hardware instance
> > when there are multiple ones present in an SoC (even multiple RC/EP).
> > 
> > So let's make use of the existing pci_bus_find_domain_nr() API to allocate
> > domain numbers based on either Devicetree (linux,pci-domain) property or
> > dynamic domain number allocation scheme.
> > 
> > It should be noted that the domain number allocated by this API will be
> > based on both RC and EP controllers in a SoC. If the 'linux,pci-domain' DT
> > property is present, then the domain number represents the actual hardware
> > instance of the PCI endpoint controller. If not, then the domain number
> > will be allocated based on the PCI EP/RC controller probe order.
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> 
> The PCI counterpart does some error checking and requires
> CONFIG_PCI_DOMAINS_GENERIC. Is that something that needs to be taken
> care of here as well?
> 

Good catch. I excluded the Kconfig check initially during development as it was
selected by most of the architectures. But I clearly failed to revisit it later.

And yes, we do need to use the guard. I also missed freeing the domain during
epc_destroy() which I'll fix in next revision. Thanks!

- Mani

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2024-07-16  4:14 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15 17:33 [PATCH 00/14] PCI: qcom: Simulate PCIe hotplug using 'global' interrupt Manivannan Sadhasivam via B4 Relay
2024-07-15 17:33 ` [PATCH 01/14] PCI: qcom-ep: Drop the redundant masking of global IRQ events Manivannan Sadhasivam via B4 Relay
2024-07-15 19:57   ` Konrad Dybcio
2024-07-15 17:33 ` [PATCH 02/14] PCI: qcom-ep: Reword the error message for receiving unknown global IRQ event Manivannan Sadhasivam via B4 Relay
2024-07-15 19:58   ` Konrad Dybcio
2024-07-15 17:33 ` [PATCH 03/14] dt-bindings: PCI: pci-ep: Update Maintainers Manivannan Sadhasivam via B4 Relay
2024-07-15 17:33 ` [PATCH 04/14] dt-bindings: PCI: pci-ep: Document 'linux,pci-domain' property Manivannan Sadhasivam via B4 Relay
2024-07-15 19:59   ` Konrad Dybcio
2024-07-16  4:05     ` Manivannan Sadhasivam
2024-07-22 23:51   ` Rob Herring
2024-07-15 17:33 ` [PATCH 05/14] dt-bindings: PCI: qcom-ep: Document "linux,pci-domain" property Manivannan Sadhasivam via B4 Relay
2024-07-16  8:41   ` neil.armstrong
2024-07-22 23:50   ` Rob Herring
2024-07-15 17:33 ` [PATCH 06/14] PCI: endpoint: Assign PCI domain number for endpoint controllers Manivannan Sadhasivam via B4 Relay
2024-07-15 20:02   ` Konrad Dybcio
2024-07-16  4:14     ` Manivannan Sadhasivam [this message]
2024-07-16 15:41   ` kernel test robot
2024-07-16 16:47   ` kernel test robot
2024-07-15 17:33 ` [PATCH 07/14] PCI: qcom-ep: Modify 'global_irq' and 'perst_irq' IRQ device names Manivannan Sadhasivam via B4 Relay
2024-07-15 17:33 ` [PATCH 08/14] ARM: dts: qcom: sdx55: Add 'linux,pci-domain' to PCIe EP controller node Manivannan Sadhasivam via B4 Relay
2024-07-15 20:03   ` Konrad Dybcio
2024-07-15 17:33 ` [PATCH 09/14] ARM: dts: qcom: sdx65: " Manivannan Sadhasivam via B4 Relay
2024-07-15 20:03   ` Konrad Dybcio
2024-07-15 17:33 ` [PATCH 10/14] arm64: dts: qcom: sa8775p: Add 'linux,pci-domain' to PCIe EP controller nodes Manivannan Sadhasivam via B4 Relay
2024-07-15 20:04   ` Konrad Dybcio
2024-07-15 17:33 ` [PATCH 11/14] dt-bindings: PCI: qcom: Add 'global' interrupt Manivannan Sadhasivam via B4 Relay
2024-07-15 17:33 ` [PATCH 12/14] dt-bindings: PCI: qcom,pcie-sm8450: " Manivannan Sadhasivam via B4 Relay
2024-07-15 17:33 ` [PATCH 13/14] PCI: qcom: Simulate PCIe hotplug using " Manivannan Sadhasivam via B4 Relay
2024-07-15 20:06   ` Konrad Dybcio
2024-07-16  4:04   ` Krishna Chaitanya Chundru
2024-07-16  4:18     ` Manivannan Sadhasivam
2024-07-16  4:24       ` Krishna Chaitanya Chundru
2024-07-16  5:54         ` Manivannan Sadhasivam
2024-07-16  8:40   ` neil.armstrong
2024-07-16 10:20     ` Manivannan Sadhasivam
2024-07-15 17:33 ` [PATCH 14/14] arm64: dts: qcom: sm8450: Add 'global' interrupt to the PCIe RC node Manivannan Sadhasivam via B4 Relay
2024-07-15 20:10 ` [PATCH 00/14] PCI: qcom: Simulate PCIe hotplug using 'global' interrupt Konrad Dybcio
2024-07-16  3:59   ` 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=20240716041416.GC3446@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzk+dt@kernel.org \
    --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=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;
as well as URLs for NNTP newsgroup(s).