* [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains @ 2025-05-26 10:42 Samiksha Garg 2025-05-26 11:20 ` Manivannan Sadhasivam ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Samiksha Garg @ 2025-05-26 10:42 UTC (permalink / raw) To: jingoohan1, manivannan.sadhasivam Cc: ajayagarwal, maurora, linux-pci, manugautam, Samiksha Garg Some vendor drivers need to write their own `msi_init` while still utilizing `dw_pcie_allocate_domains` method to allocate IRQ domains. Export the function for this purpose. Signed-off-by: Samiksha Garg <samikshagarg@google.com> --- drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index ecc33f6789e3..5b949547f917 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -249,6 +249,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) return 0; } +EXPORT_SYMBOL_GPL(dw_pcie_allocate_domains); static void dw_pcie_free_msi(struct dw_pcie_rp *pp) { -- 2.49.0.1151.ga128411c76-goog ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains 2025-05-26 10:42 [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains Samiksha Garg @ 2025-05-26 11:20 ` Manivannan Sadhasivam 2025-05-26 16:04 ` Samiksha Garg 2025-05-26 16:26 ` Hans Zhang 2025-05-26 16:29 ` Hans Zhang 2 siblings, 1 reply; 9+ messages in thread From: Manivannan Sadhasivam @ 2025-05-26 11:20 UTC (permalink / raw) To: Samiksha Garg; +Cc: jingoohan1, ajayagarwal, maurora, linux-pci, manugautam On Mon, May 26, 2025 at 10:42:40AM +0000, Samiksha Garg wrote: > Some vendor drivers need to write their own `msi_init` while > still utilizing `dw_pcie_allocate_domains` method to allocate > IRQ domains. Export the function for this purpose. > NAK. Symbols should have atleast one upstream user to be exported. We do not export symbols for random vendor drivers, sorry. - Mani > Signed-off-by: Samiksha Garg <samikshagarg@google.com> > --- > drivers/pci/controller/dwc/pcie-designware-host.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c > index ecc33f6789e3..5b949547f917 100644 > --- a/drivers/pci/controller/dwc/pcie-designware-host.c > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c > @@ -249,6 +249,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) > > return 0; > } > +EXPORT_SYMBOL_GPL(dw_pcie_allocate_domains); > > static void dw_pcie_free_msi(struct dw_pcie_rp *pp) > { > -- > 2.49.0.1151.ga128411c76-goog > -- மணிவண்ணன் சதாசிவம் ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains 2025-05-26 11:20 ` Manivannan Sadhasivam @ 2025-05-26 16:04 ` Samiksha Garg 2025-05-28 3:45 ` Manivannan Sadhasivam 0 siblings, 1 reply; 9+ messages in thread From: Samiksha Garg @ 2025-05-26 16:04 UTC (permalink / raw) To: Manivannan Sadhasivam Cc: jingoohan1, ajayagarwal, maurora, linux-pci, manugautam Hi Mani, Thanks for your response. I can see that pci-keystone driver already calls this function. Does it not mean that there is already an upstream user? Thanks, Samiksha On Mon, May 26, 2025 at 04:50:11PM +0530, Manivannan Sadhasivam wrote: > On Mon, May 26, 2025 at 10:42:40AM +0000, Samiksha Garg wrote: > > Some vendor drivers need to write their own `msi_init` while > > still utilizing `dw_pcie_allocate_domains` method to allocate > > IRQ domains. Export the function for this purpose. > > > > NAK. Symbols should have atleast one upstream user to be exported. We do not > export symbols for random vendor drivers, sorry. > > - Mani > > > Signed-off-by: Samiksha Garg <samikshagarg@google.com> > > --- > > drivers/pci/controller/dwc/pcie-designware-host.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c > > index ecc33f6789e3..5b949547f917 100644 > > --- a/drivers/pci/controller/dwc/pcie-designware-host.c > > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c > > @@ -249,6 +249,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) > > > > return 0; > > } > > +EXPORT_SYMBOL_GPL(dw_pcie_allocate_domains); > > > > static void dw_pcie_free_msi(struct dw_pcie_rp *pp) > > { > > -- > > 2.49.0.1151.ga128411c76-goog > > > > -- > மணிவண்ணன் சதாசிவம் ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains 2025-05-26 16:04 ` Samiksha Garg @ 2025-05-28 3:45 ` Manivannan Sadhasivam 0 siblings, 0 replies; 9+ messages in thread From: Manivannan Sadhasivam @ 2025-05-28 3:45 UTC (permalink / raw) To: Samiksha Garg; +Cc: jingoohan1, ajayagarwal, maurora, linux-pci, manugautam On Mon, May 26, 2025 at 04:04:04PM +0000, Samiksha Garg wrote: > Hi Mani, > Thanks for your response. I can see that pci-keystone driver already calls this function. > Does it not mean that there is already an upstream user? > No, since keystone driver is not using the exported symbol. - Mani > Thanks, > Samiksha > > On Mon, May 26, 2025 at 04:50:11PM +0530, Manivannan Sadhasivam wrote: > > On Mon, May 26, 2025 at 10:42:40AM +0000, Samiksha Garg wrote: > > > Some vendor drivers need to write their own `msi_init` while > > > still utilizing `dw_pcie_allocate_domains` method to allocate > > > IRQ domains. Export the function for this purpose. > > > > > > > NAK. Symbols should have atleast one upstream user to be exported. We do not > > export symbols for random vendor drivers, sorry. > > > > - Mani > > > > > Signed-off-by: Samiksha Garg <samikshagarg@google.com> > > > --- > > > drivers/pci/controller/dwc/pcie-designware-host.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c > > > index ecc33f6789e3..5b949547f917 100644 > > > --- a/drivers/pci/controller/dwc/pcie-designware-host.c > > > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c > > > @@ -249,6 +249,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) > > > > > > return 0; > > > } > > > +EXPORT_SYMBOL_GPL(dw_pcie_allocate_domains); > > > > > > static void dw_pcie_free_msi(struct dw_pcie_rp *pp) > > > { > > > -- > > > 2.49.0.1151.ga128411c76-goog > > > > > > > -- > > மணிவண்ணன் சதாசிவம் -- மணிவண்ணன் சதாசிவம் ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains 2025-05-26 10:42 [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains Samiksha Garg 2025-05-26 11:20 ` Manivannan Sadhasivam @ 2025-05-26 16:26 ` Hans Zhang 2025-05-26 16:29 ` Hans Zhang 2 siblings, 0 replies; 9+ messages in thread From: Hans Zhang @ 2025-05-26 16:26 UTC (permalink / raw) To: Samiksha Garg, jingoohan1, manivannan.sadhasivam Cc: ajayagarwal, maurora, linux-pci, manugautam On 2025/5/26 18:42, Samiksha Garg wrote: > Hi Mani, Thanks for your response. I can see that pci-keystone driver > already calls this function. Does it not mean that there is already an > upstream user? Thanks, Samiksha On Mon, May 26, 2025 at 04:50:11PM > +0530, Manivannan Sadhasivam wrote: >> On Mon, May 26, 2025 at 10:42:40AM +0000, Samiksha Garg wrote: >>> Some vendor drivers need to write their own `msi_init` while >>> still utilizing `dw_pcie_allocate_domains` method to allocate >>> IRQ domains. Export the function for this purpose. >>> >> NAK. Symbols should have atleast one upstream user to be exported. We do not >> export symbols for random vendor drivers, sorry. >> >> - Mani >> >>> Signed-off-by: Samiksha Garg<samikshagarg@google.com> >>> --- >>> drivers/pci/controller/dwc/pcie-designware-host.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c >>> index ecc33f6789e3..5b949547f917 100644 >>> --- a/drivers/pci/controller/dwc/pcie-designware-host.c >>> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c >>> @@ -249,6 +249,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) >>> >>> return 0; >>> } >>> +EXPORT_SYMBOL_GPL(dw_pcie_allocate_domains); >>> >>> static void dw_pcie_free_msi(struct dw_pcie_rp *pp) >>> { >>> -- >>> 2.49.0.1151.ga128411c76-goog ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains 2025-05-26 10:42 [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains Samiksha Garg 2025-05-26 11:20 ` Manivannan Sadhasivam 2025-05-26 16:26 ` Hans Zhang @ 2025-05-26 16:29 ` Hans Zhang 2025-05-27 4:42 ` Samiksha Garg 2 siblings, 1 reply; 9+ messages in thread From: Hans Zhang @ 2025-05-26 16:29 UTC (permalink / raw) To: Samiksha Garg, jingoohan1, manivannan.sadhasivam Cc: ajayagarwal, maurora, linux-pci, manugautam On 2025/5/26 18:42, Samiksha Garg wrote: > Hi Mani, > Thanks for your response. I can see that pci-keystone driver already calls this function. > Does it not mean that there is already an upstream user? > Hello, pci-keystone is build-in. Best regards, Hans ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains 2025-05-26 16:29 ` Hans Zhang @ 2025-05-27 4:42 ` Samiksha Garg 2025-05-27 5:49 ` Hans Zhang 0 siblings, 1 reply; 9+ messages in thread From: Samiksha Garg @ 2025-05-27 4:42 UTC (permalink / raw) To: Hans Zhang Cc: jingoohan1, manivannan.sadhasivam, ajayagarwal, maurora, linux-pci, manugautam Hi, Yes I understand that `pci-keystone` is currently built in, which is why it can use `dw_pcie_allocate_domains` without the need for symbol export. My intent with the patch was to make this API accessible to other out-of-tree drivers that rely on the Designware core and might have similar want as `pci-keystone`. Since `dw_pcie_allocate_domains` is already non-static, exporting it could enable consistent reuse without requiring duplication or workarounds. Thanks, Samiksha On Tue, May 27, 2025 at 12:29:18AM +0800, Hans Zhang wrote: > > > On 2025/5/26 18:42, Samiksha Garg wrote: > > Hi Mani, > > Thanks for your response. I can see that pci-keystone driver already calls this function. > > Does it not mean that there is already an upstream user? > > > > Hello, > > pci-keystone is build-in. > > Best regards, > Hans > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains 2025-05-27 4:42 ` Samiksha Garg @ 2025-05-27 5:49 ` Hans Zhang 2025-05-27 8:09 ` Christoph Hellwig 0 siblings, 1 reply; 9+ messages in thread From: Hans Zhang @ 2025-05-27 5:49 UTC (permalink / raw) To: Samiksha Garg, Hans Zhang Cc: jingoohan1, manivannan.sadhasivam, ajayagarwal, maurora, linux-pci, manugautam On 2025/5/27 12:42, Samiksha Garg wrote: > [You don't often get email from samikshagarg@google.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > EXTERNAL EMAIL > > Hi, > Yes I understand that `pci-keystone` is currently built in, > which is why it can use `dw_pcie_allocate_domains` without > the need for symbol export. > > My intent with the patch was to make this API accessible to > other out-of-tree drivers that rely on the Designware core > and might have similar want as `pci-keystone`. > > Since `dw_pcie_allocate_domains` is already non-static, > exporting it could enable consistent reuse without requiring > duplication or workarounds. > Hello, Just as Mani said, you need to upstream your Root Port driver. Otherwise, too many APIs need to be exported. I have also encountered this kind of problem of yours. Actually, I think the dwc driver should be compiled as a module so that many SOC manufacturers can modify it by themselves. Otherwise, for example, Android GKI cannot meet the requirements. My previous approach was to copy the entire dwc driver and rename all the functions. Finally, it is loaded in the form of ko. Best regards, Hans > Thanks, > Samiksha > > On Tue, May 27, 2025 at 12:29:18AM +0800, Hans Zhang wrote: >> >> >> On 2025/5/26 18:42, Samiksha Garg wrote: >>> Hi Mani, >>> Thanks for your response. I can see that pci-keystone driver already calls this function. >>> Does it not mean that there is already an upstream user? >>> >> >> Hello, >> >> pci-keystone is build-in. >> >> Best regards, >> Hans >> > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains 2025-05-27 5:49 ` Hans Zhang @ 2025-05-27 8:09 ` Christoph Hellwig 0 siblings, 0 replies; 9+ messages in thread From: Christoph Hellwig @ 2025-05-27 8:09 UTC (permalink / raw) To: Hans Zhang Cc: Samiksha Garg, Hans Zhang, jingoohan1, manivannan.sadhasivam, ajayagarwal, maurora, linux-pci, manugautam On Tue, May 27, 2025 at 01:49:57PM +0800, Hans Zhang wrote: > I have also encountered this kind of problem of yours. Actually, I think the > dwc driver should be compiled as a module so that many SOC manufacturers can > modify it by themselves. Otherwise, for example, Android GKI cannot meet the > requirements. My previous approach was to copy the entire dwc driver and > rename all the functions. Finally, it is loaded in the form of ko. Adnroid folks just need to upstream their bloody drivers instead of all this crap. And if they don't it is none of our business. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-05-28 3:45 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-05-26 10:42 [PATCH] PCI: dwc: EXPORT dw_pcie_allocate_domains Samiksha Garg 2025-05-26 11:20 ` Manivannan Sadhasivam 2025-05-26 16:04 ` Samiksha Garg 2025-05-28 3:45 ` Manivannan Sadhasivam 2025-05-26 16:26 ` Hans Zhang 2025-05-26 16:29 ` Hans Zhang 2025-05-27 4:42 ` Samiksha Garg 2025-05-27 5:49 ` Hans Zhang 2025-05-27 8:09 ` Christoph Hellwig
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).