* [PATCH v2 0/3] PCI: tegra: Allow building as a module
@ 2025-04-29 1:05 Aaron Kling via B4 Relay
2025-04-29 1:05 ` [PATCH v2 1/3] irqdomain: Export irq_domain_free_irqs Aaron Kling via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Aaron Kling via B4 Relay @ 2025-04-29 1:05 UTC (permalink / raw)
To: Thomas Gleixner, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Thierry Reding,
Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
Cc: linux-kernel, linux-pci, linux-tegra, linux-pm, Aaron Kling
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
Changes in v2:
- Add patch to export tegra_cpuidle_pcie_irqs_in_use as required when
building pci-tegra as a module for arm
- Drop module exit to prevent module unloading, as requested
- Link to v1: https://lore.kernel.org/r/20250420-pci-tegra-module-v1-0-c0a1f831354a@gmail.com
---
Aaron Kling (3):
irqdomain: Export irq_domain_free_irqs
cpuidle: tegra: Export tegra_cpuidle_pcie_irqs_in_use
PCI: tegra: Allow building as a module
drivers/cpuidle/cpuidle-tegra.c | 1 +
drivers/pci/controller/Kconfig | 2 +-
drivers/pci/controller/pci-tegra.c | 5 ++++-
kernel/irq/irqdomain.c | 1 +
4 files changed, 7 insertions(+), 2 deletions(-)
---
base-commit: 18352e73612d60b81790d2437845276ae499b64a
change-id: 20250313-pci-tegra-module-7cbd1c5e70af
Best regards,
--
Aaron Kling <webgeek1234@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/3] irqdomain: Export irq_domain_free_irqs
2025-04-29 1:05 [PATCH v2 0/3] PCI: tegra: Allow building as a module Aaron Kling via B4 Relay
@ 2025-04-29 1:05 ` Aaron Kling via B4 Relay
2025-04-29 6:36 ` Thomas Gleixner
2025-04-29 1:05 ` [PATCH v2 2/3] cpuidle: tegra: Export tegra_cpuidle_pcie_irqs_in_use Aaron Kling via B4 Relay
2025-04-29 1:05 ` [PATCH v2 3/3] PCI: tegra: Allow building as a module Aaron Kling via B4 Relay
2 siblings, 1 reply; 6+ messages in thread
From: Aaron Kling via B4 Relay @ 2025-04-29 1:05 UTC (permalink / raw)
To: Thomas Gleixner, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Thierry Reding,
Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
Cc: linux-kernel, linux-pci, linux-tegra, linux-pm, Aaron Kling
From: Aaron Kling <webgeek1234@gmail.com>
Add export for irq_domain_free_irqs() so that we can allow drivers like
the pci-tegra driver to be loadable as a module.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
kernel/irq/irqdomain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index ec6d8e72d980f604ded2bfa2143420e0e0095920..36cd79a8a2ce960b07b03c40067343ec8f632452 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1890,6 +1890,7 @@ void irq_domain_free_irqs(unsigned int virq, unsigned int nr_irqs)
irq_domain_free_irq_data(virq, nr_irqs);
irq_free_descs(virq, nr_irqs);
}
+EXPORT_SYMBOL_GPL(irq_domain_free_irqs);
static void irq_domain_free_one_irq(struct irq_domain *domain, unsigned int virq)
{
--
2.48.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] cpuidle: tegra: Export tegra_cpuidle_pcie_irqs_in_use
2025-04-29 1:05 [PATCH v2 0/3] PCI: tegra: Allow building as a module Aaron Kling via B4 Relay
2025-04-29 1:05 ` [PATCH v2 1/3] irqdomain: Export irq_domain_free_irqs Aaron Kling via B4 Relay
@ 2025-04-29 1:05 ` Aaron Kling via B4 Relay
2025-04-29 1:05 ` [PATCH v2 3/3] PCI: tegra: Allow building as a module Aaron Kling via B4 Relay
2 siblings, 0 replies; 6+ messages in thread
From: Aaron Kling via B4 Relay @ 2025-04-29 1:05 UTC (permalink / raw)
To: Thomas Gleixner, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Thierry Reding,
Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
Cc: linux-kernel, linux-pci, linux-tegra, linux-pm, Aaron Kling
From: Aaron Kling <webgeek1234@gmail.com>
Add export for tegra_cpuidle_pcie_irqs_in_use() so that we can allow
drivers like the pci-tegra driver to be loadable as a module.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
drivers/cpuidle/cpuidle-tegra.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c
index b203a93deac5f378572be90e22c73e7417adb99e..aca907a62bb5de4ee4c71c1900eacedd4b90bc0a 100644
--- a/drivers/cpuidle/cpuidle-tegra.c
+++ b/drivers/cpuidle/cpuidle-tegra.c
@@ -336,6 +336,7 @@ void tegra_cpuidle_pcie_irqs_in_use(void)
pr_info("disabling CC6 state, since PCIe IRQs are in use\n");
tegra_cpuidle_disable_state(TEGRA_CC6);
}
+EXPORT_SYMBOL_GPL(tegra_cpuidle_pcie_irqs_in_use);
static void tegra_cpuidle_setup_tegra114_c7_state(void)
{
--
2.48.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] PCI: tegra: Allow building as a module
2025-04-29 1:05 [PATCH v2 0/3] PCI: tegra: Allow building as a module Aaron Kling via B4 Relay
2025-04-29 1:05 ` [PATCH v2 1/3] irqdomain: Export irq_domain_free_irqs Aaron Kling via B4 Relay
2025-04-29 1:05 ` [PATCH v2 2/3] cpuidle: tegra: Export tegra_cpuidle_pcie_irqs_in_use Aaron Kling via B4 Relay
@ 2025-04-29 1:05 ` Aaron Kling via B4 Relay
2025-05-02 15:33 ` Manivannan Sadhasivam
2 siblings, 1 reply; 6+ messages in thread
From: Aaron Kling via B4 Relay @ 2025-04-29 1:05 UTC (permalink / raw)
To: Thomas Gleixner, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Thierry Reding,
Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
Cc: linux-kernel, linux-pci, linux-tegra, linux-pm, Aaron Kling
From: Aaron Kling <webgeek1234@gmail.com>
This changes the module macro back to builtin, which does not define an
exit function. This will prevent the module from being unloaded. There
are concerns with modules not cleaning up IRQs on unload, thus this
needs specifically disallowed.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
drivers/pci/controller/Kconfig | 2 +-
drivers/pci/controller/pci-tegra.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 9800b768105402d6dd1ba4b134c2ec23da6e4201..a9164dd2eccaead5ae9348c24a5ad75fcb40f507 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -224,7 +224,7 @@ config PCI_HYPERV_INTERFACE
driver.
config PCI_TEGRA
- bool "NVIDIA Tegra PCIe controller"
+ tristate "NVIDIA Tegra PCIe controller"
depends on ARCH_TEGRA || COMPILE_TEST
depends on PCI_MSI
help
diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index b3cdbc5927de3742161310610dc5dcb836f5dd69..1539d172d708c11c3d085721ab9416be3dea6b12 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -2802,4 +2802,7 @@ static struct platform_driver tegra_pcie_driver = {
.probe = tegra_pcie_probe,
.remove = tegra_pcie_remove,
};
-module_platform_driver(tegra_pcie_driver);
+builtin_platform_driver(tegra_pcie_driver);
+MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
+MODULE_DESCRIPTION("NVIDIA PCI host controller driver");
+MODULE_LICENSE("GPL");
--
2.48.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/3] irqdomain: Export irq_domain_free_irqs
2025-04-29 1:05 ` [PATCH v2 1/3] irqdomain: Export irq_domain_free_irqs Aaron Kling via B4 Relay
@ 2025-04-29 6:36 ` Thomas Gleixner
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Gleixner @ 2025-04-29 6:36 UTC (permalink / raw)
To: Aaron Kling via B4 Relay, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki,
Daniel Lezcano
Cc: linux-kernel, linux-pci, linux-tegra, linux-pm, Aaron Kling
On Mon, Apr 28 2025 at 20:05, Aaron Kling via wrote:
$subject: .... irq_domain_free_irqs()
> From: Aaron Kling <webgeek1234@gmail.com>
>
> Add export for irq_domain_free_irqs() so that we can allow drivers like
> the pci-tegra driver to be loadable as a module.
Export irq_domain_free_irqs() to allow PCI/MSI drivers like pci-tegra to
be built as a module.
See https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#changelog
With that addressed:
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 3/3] PCI: tegra: Allow building as a module
2025-04-29 1:05 ` [PATCH v2 3/3] PCI: tegra: Allow building as a module Aaron Kling via B4 Relay
@ 2025-05-02 15:33 ` Manivannan Sadhasivam
0 siblings, 0 replies; 6+ messages in thread
From: Manivannan Sadhasivam @ 2025-05-02 15:33 UTC (permalink / raw)
To: webgeek1234
Cc: Thomas Gleixner, Lorenzo Pieralisi, Krzysztof Wilczyński,
Rob Herring, Bjorn Helgaas, Thierry Reding, Jonathan Hunter,
Rafael J. Wysocki, Daniel Lezcano, linux-kernel, linux-pci,
linux-tegra, linux-pm
On Mon, Apr 28, 2025 at 08:05:48PM -0500, Aaron Kling via B4 Relay wrote:
> From: Aaron Kling <webgeek1234@gmail.com>
>
> This changes the module macro back to builtin, which does not define an
> exit function. This will prevent the module from being unloaded. There
> are concerns with modules not cleaning up IRQs on unload, thus this
> needs specifically disallowed.
>
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> ---
> drivers/pci/controller/Kconfig | 2 +-
> drivers/pci/controller/pci-tegra.c | 5 ++++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 9800b768105402d6dd1ba4b134c2ec23da6e4201..a9164dd2eccaead5ae9348c24a5ad75fcb40f507 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -224,7 +224,7 @@ config PCI_HYPERV_INTERFACE
> driver.
>
> config PCI_TEGRA
> - bool "NVIDIA Tegra PCIe controller"
> + tristate "NVIDIA Tegra PCIe controller"
> depends on ARCH_TEGRA || COMPILE_TEST
> depends on PCI_MSI
> help
> diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
> index b3cdbc5927de3742161310610dc5dcb836f5dd69..1539d172d708c11c3d085721ab9416be3dea6b12 100644
> --- a/drivers/pci/controller/pci-tegra.c
> +++ b/drivers/pci/controller/pci-tegra.c
> @@ -2802,4 +2802,7 @@ static struct platform_driver tegra_pcie_driver = {
> .probe = tegra_pcie_probe,
> .remove = tegra_pcie_remove,
Please drop the .remove() callback also which becomes unused.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-05-02 15:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29 1:05 [PATCH v2 0/3] PCI: tegra: Allow building as a module Aaron Kling via B4 Relay
2025-04-29 1:05 ` [PATCH v2 1/3] irqdomain: Export irq_domain_free_irqs Aaron Kling via B4 Relay
2025-04-29 6:36 ` Thomas Gleixner
2025-04-29 1:05 ` [PATCH v2 2/3] cpuidle: tegra: Export tegra_cpuidle_pcie_irqs_in_use Aaron Kling via B4 Relay
2025-04-29 1:05 ` [PATCH v2 3/3] PCI: tegra: Allow building as a module Aaron Kling via B4 Relay
2025-05-02 15:33 ` Manivannan Sadhasivam
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).