linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Enable TI SCI INTA MSI as loadable module
@ 2025-07-07 15:35 Guillaume La Roque
  2025-07-07 15:35 ` [PATCH 1/2] kernel: irq: msi: Export symbols for TI SCI INTA MSI module compilation Guillaume La Roque
  2025-07-07 15:35 ` [PATCH 2/2] soc: ti: ti_sci_inta_msi: Enable module compilation support Guillaume La Roque
  0 siblings, 2 replies; 5+ messages in thread
From: Guillaume La Roque @ 2025-07-07 15:35 UTC (permalink / raw)
  To: Thomas Gleixner, vigneshr, Nishanth Menon, Santosh Shilimkar,
	Tero Kristo
  Cc: linux-kernel, linux-arm-kernel, Guillaume La Roque

This series enables the TI SCI INTA MSI driver to be compiled as a loadable
module instead of being built-in only. This provides more flexibility for
system configuration and reduces kernel size when the functionality is not
always needed.

The series includes two patches:
- Export necessary MSI symbols from the core kernel to support module compilation
- Update the TI SCI INTA MSI driver to support module compilation

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
Guillaume La Roque (2):
      kernel: irq: msi: Export symbols for TI SCI INTA MSI module compilation
      soc: ti: ti_sci_inta_msi: Enable module compilation support

 drivers/soc/ti/Kconfig           | 5 ++++-
 drivers/soc/ti/ti_sci_inta_msi.c | 5 +++++
 kernel/irq/msi.c                 | 5 +++++
 3 files changed, 14 insertions(+), 1 deletion(-)
---
base-commit: 666f6d7e7fadd8132f310a87d1f8ae08c3966e4a
change-id: 20250707-timsi-c66a2816c84f

Best regards,
-- 
Guillaume La Roque <glaroque@baylibre.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] kernel: irq: msi: Export symbols for TI SCI INTA MSI module compilation
  2025-07-07 15:35 [PATCH 0/2] Enable TI SCI INTA MSI as loadable module Guillaume La Roque
@ 2025-07-07 15:35 ` Guillaume La Roque
  2025-07-18 20:57   ` Thomas Gleixner
  2025-07-07 15:35 ` [PATCH 2/2] soc: ti: ti_sci_inta_msi: Enable module compilation support Guillaume La Roque
  1 sibling, 1 reply; 5+ messages in thread
From: Guillaume La Roque @ 2025-07-07 15:35 UTC (permalink / raw)
  To: Thomas Gleixner, vigneshr, Nishanth Menon, Santosh Shilimkar,
	Tero Kristo
  Cc: linux-kernel, linux-arm-kernel, Guillaume La Roque

Export MSI domain management functions to allow the TI SCI INTA MSI
driver to be compiled as a module. The following symbols are now
available for module use:

- msi_domain_insert_msi_desc
- msi_domain_free_msi_descs_range
- msi_setup_device_data
- msi_create_irq_domain
- msi_domain_alloc_irqs_all_locked

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
 kernel/irq/msi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 9febe797a5f6..4af232b6796b 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -163,6 +163,7 @@ int msi_domain_insert_msi_desc(struct device *dev, unsigned int domid,
 
 	return msi_insert_desc(dev, desc, domid, init_desc->msi_index);
 }
+EXPORT_SYMBOL_GPL(msi_domain_insert_msi_desc);
 
 static bool msi_desc_match(struct msi_desc *desc, enum msi_desc_filter filter)
 {
@@ -235,6 +236,7 @@ void msi_domain_free_msi_descs_range(struct device *dev, unsigned int domid,
 
 	msi_domain_free_descs(dev, &ctrl);
 }
+EXPORT_SYMBOL_GPL(msi_domain_free_msi_descs_range);
 
 /**
  * msi_domain_add_simple_msi_descs - Allocate and initialize MSI descriptors
@@ -342,6 +344,7 @@ int msi_setup_device_data(struct device *dev)
 	devres_add(dev, md);
 	return 0;
 }
+EXPORT_SYMBOL_GPL(msi_setup_device_data);
 
 /**
  * __msi_lock_descs - Lock the MSI descriptor storage of a device
@@ -910,6 +913,7 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode,
 {
 	return __msi_create_irq_domain(fwnode, info, 0, parent);
 }
+EXPORT_SYMBOL_GPL(msi_create_irq_domain);
 
 /**
  * msi_create_parent_irq_domain - Create an MSI-parent interrupt domain
@@ -1472,6 +1476,7 @@ int msi_domain_alloc_irqs_all_locked(struct device *dev, unsigned int domid, int
 
 	return msi_domain_alloc_locked(dev, &ctrl);
 }
+EXPORT_SYMBOL_GPL(msi_domain_alloc_irqs_all_locked);
 
 static struct msi_map __msi_domain_alloc_irq_at(struct device *dev, unsigned int domid,
 						unsigned int index,

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] soc: ti: ti_sci_inta_msi: Enable module compilation support
  2025-07-07 15:35 [PATCH 0/2] Enable TI SCI INTA MSI as loadable module Guillaume La Roque
  2025-07-07 15:35 ` [PATCH 1/2] kernel: irq: msi: Export symbols for TI SCI INTA MSI module compilation Guillaume La Roque
@ 2025-07-07 15:35 ` Guillaume La Roque
  1 sibling, 0 replies; 5+ messages in thread
From: Guillaume La Roque @ 2025-07-07 15:35 UTC (permalink / raw)
  To: Thomas Gleixner, vigneshr, Nishanth Menon, Santosh Shilimkar,
	Tero Kristo
  Cc: linux-kernel, linux-arm-kernel, Guillaume La Roque

Add module support to the TI SCI INTA MSI driver:
- Change Kconfig from bool to tristate to allow module compilation
- Add linux/module.h include for module functionality
- Add MODULE_LICENSE, MODULE_DESCRIPTION, and MODULE_AUTHOR macros

This allows the driver to be compiled as a loadable kernel module
named ti_sci_inta_msi.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
 drivers/soc/ti/Kconfig           | 5 ++++-
 drivers/soc/ti/ti_sci_inta_msi.c | 5 +++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig
index 1a93001c9e36..0a9eb5ac264b 100644
--- a/drivers/soc/ti/Kconfig
+++ b/drivers/soc/ti/Kconfig
@@ -85,7 +85,10 @@ config TI_PRUSS
 endif # SOC_TI
 
 config TI_SCI_INTA_MSI_DOMAIN
-	bool
+	tristate "TI SCI INTA MSI Domain driver"
 	select GENERIC_MSI_IRQ
 	help
 	  Driver to enable Interrupt Aggregator specific MSI Domain.
+
+	  Say Y here to compile it into the kernel or M to compile it as a
+	  module. The module will be called ti_sci_inta_msi.
diff --git a/drivers/soc/ti/ti_sci_inta_msi.c b/drivers/soc/ti/ti_sci_inta_msi.c
index 193266f5e3f9..d92cab319d57 100644
--- a/drivers/soc/ti/ti_sci_inta_msi.c
+++ b/drivers/soc/ti/ti_sci_inta_msi.c
@@ -8,6 +8,7 @@
 
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
+#include <linux/module.h>
 #include <linux/msi.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
@@ -115,3 +116,7 @@ int ti_sci_inta_msi_domain_alloc_irqs(struct device *dev,
 	return ret;
 }
 EXPORT_SYMBOL_GPL(ti_sci_inta_msi_domain_alloc_irqs);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Texas Instruments K3 Interrupt Aggregator MSI bus");
+MODULE_AUTHOR("Lokesh Vutla <lokeshvutla@ti.com>");

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] kernel: irq: msi: Export symbols for TI SCI INTA MSI module compilation
  2025-07-07 15:35 ` [PATCH 1/2] kernel: irq: msi: Export symbols for TI SCI INTA MSI module compilation Guillaume La Roque
@ 2025-07-18 20:57   ` Thomas Gleixner
  2025-07-22  8:03     ` Guillaume La Roque
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2025-07-18 20:57 UTC (permalink / raw)
  To: Guillaume La Roque, vigneshr, Nishanth Menon, Santosh Shilimkar,
	Tero Kristo
  Cc: linux-kernel, linux-arm-kernel, Guillaume La Roque

On Mon, Jul 07 2025 at 17:35, Guillaume La Roque wrote:

The made up subsystem prefix is not really useful. See:

  https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject

> Export MSI domain management functions to allow the TI SCI INTA MSI
> driver to be compiled as a module. The following symbols are now
> available for module use:

While symbols is technically correct, it's way simpler to understand
that these are functions.

> - msi_domain_insert_msi_desc

And with that you want to use function notation, i.e. foo() instead of foo.

Thanks,

        tglx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] kernel: irq: msi: Export symbols for TI SCI INTA MSI module compilation
  2025-07-18 20:57   ` Thomas Gleixner
@ 2025-07-22  8:03     ` Guillaume La Roque
  0 siblings, 0 replies; 5+ messages in thread
From: Guillaume La Roque @ 2025-07-22  8:03 UTC (permalink / raw)
  To: Thomas Gleixner, vigneshr, Nishanth Menon, Santosh Shilimkar,
	Tero Kristo
  Cc: linux-kernel, linux-arm-kernel

Le 18/07/2025 à 22:57, Thomas Gleixner a écrit :
> On Mon, Jul 07 2025 at 17:35, Guillaume La Roque wrote:
>
> The made up subsystem prefix is not really useful. See:
>
>    https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject
>
>> Export MSI domain management functions to allow the TI SCI INTA MSI
>> driver to be compiled as a module. The following symbols are now
>> available for module use:
> While symbols is technically correct, it's way simpler to understand
> that these are functions.
>
>> - msi_domain_insert_msi_desc
> And with that you want to use function notation, i.e. foo() instead of foo.
>
> Thanks,
>
>          tglx

Thanks for feedback i'll fix in v2.

Guillaume


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-22  8:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-07 15:35 [PATCH 0/2] Enable TI SCI INTA MSI as loadable module Guillaume La Roque
2025-07-07 15:35 ` [PATCH 1/2] kernel: irq: msi: Export symbols for TI SCI INTA MSI module compilation Guillaume La Roque
2025-07-18 20:57   ` Thomas Gleixner
2025-07-22  8:03     ` Guillaume La Roque
2025-07-07 15:35 ` [PATCH 2/2] soc: ti: ti_sci_inta_msi: Enable module compilation support Guillaume La Roque

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).