PCI: dwc: EXPORT dw_pcie_allocate_domains
PATCH 1/1 PCI: dwc: EXPORT dw_pcie_allocate_domains
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.
--- drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pcie-designware-host.c +1 -0
@@ -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) {
Signature · 1 line
2.49.0.1151.ga128411c76-goog
Quoted 4 lines · Samiksha Garg
Some vendor drivers need to write their own
msi_initwhile still utilizingdw_pcie_allocate_domainsmethod 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
Quoted 20 lines
Signed-off-by Samiksha Garg <[email protected]>--- drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/dwc/pcie-designware-host.c +1
-0@@ -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) {Signature · 1 line
2.49.0.1151.ga128411c76-goog
Signature · 1 line
மணிவண்ணன் சதாசிவம்
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
Quoted 34 lines · Manivannan Sadhasivam
Quoted 4 lines · Samiksha Garg
Some vendor drivers need to write their own
msi_initwhile still utilizingdw_pcie_allocate_domainsmethod 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
Quoted 20 lines
Signed-off-by Samiksha Garg <[email protected]>--- drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/dwc/pcie-designware-host.c +1
-0@@ -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) {Signature · 1 line
2.49.0.1151.ga128411c76-googSignature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 4 lines · Samiksha Garg
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
Quoted 38 lines
Thanks,
SamikshaQuoted 34 lines · Manivannan Sadhasivam
Quoted 4 lines · Samiksha Garg
Some vendor drivers need to write their own
msi_initwhile still utilizingdw_pcie_allocate_domainsmethod 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
Quoted 20 lines
Signed-off-by Samiksha Garg <[email protected]>--- drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/dwc/pcie-designware-host.c +1
-0@@ -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) {Signature · 1 line
2.49.0.1151.ga128411c76-googSignature · 1 line
மணிவண்ணன் சதாசிவம்
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 31 lines · Samiksha Garg
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
Quoted 29 lines · Manivannan Sadhasivam
Quoted 4 lines · Samiksha Garg
Some vendor drivers need to write their own
msi_initwhile still utilizingdw_pcie_allocate_domainsmethod 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
Quoted 19 lines
Signed-off-by Samiksha Garg<[email protected]>--- drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/dwc/pcie-designware-host.c +1
-0@@ -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) {Signature · 1 line
2.49.0.1151.ga128411c76-goog
Quoted 4 lines · Samiksha Garg
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
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
Quoted 15 lines · Hans Zhang
Quoted 4 lines · Samiksha Garg
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
Quoted 9 lines · Samiksha Garg
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
EXTERNAL EMAIL
Hi,
Yes I understand thatpci-keystoneis currently built in, which is why it can usedw_pcie_allocate_domainswithout the need for symbol export.
Quoted 8 lines
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_domainsis 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
Quoted 20 lines
Thanks,
SamikshaQuoted 15 lines · Hans Zhang
Quoted 4 lines · Samiksha Garg
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
Quoted 5 lines · Hans Zhang
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.