irqchip: Kconfig: Add module support for TI inta/intr
Subsystems (3)
v3 cover irqchip: Kconfig: Add module support for TI inta/intr
Added module support for TI interrupt aggregator and interrupt router drivers. Default value for both drivers is ARCH_K3 and the interrupt aggregator depends on ARCH_K3 as it contains 64 bit only ops. Tested allmodconfig builds with ARCH=arm and ARCH=arm64.
Changes in v3:
- Add MODULE_LICENSE in drivers
Changes in v2:
- Added depends on ARCH_K3 for the interrupt aggregator driver as it uses
64 bit ops
---
Nicolas Frayer (2):
irqchip: Kconfig: module build support for the TI interrupt router driver
irqchip: Kconfig: Added module build support for the TI interrupt aggregator
arch/arm64/Kconfig.platforms | 2 -- drivers/irqchip/Kconfig | 8 +++++--- drivers/irqchip/irq-ti-sci-inta.c | 1 + drivers/irqchip/irq-ti-sci-intr.c | 1 + 4 files changed, 7 insertions(+), 5 deletions(-)
---
base-commit: 2f87d0916ce0d2925cedbc9e8f5d6291ba2ac7b2
change-id: 20241016-timodules-174770215dd8
Best regards,
Signature · 1 line
Guillaume La Roque <[email protected]>
PATCH v3 1/2 irqchip: Kconfig: module build support for the TI interrupt router driver
From: Nicolas Frayer <[email protected]>
Added module build support in Kconfig for the TI SCI interrupt router driver
--- arch/arm64/Kconfig.platforms | 1 - drivers/irqchip/Kconfig | 3 ++- drivers/irqchip/irq-ti-sci-intr.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)
arch/arm64/Kconfig.platforms +0 -1
@@ -135,7 +135,6 @@ config ARCH_K3 select SOC_TI select TI_MESSAGE_MANAGER select TI_SCI_PROTOCOL - select TI_SCI_INTR_IRQCHIP select TI_SCI_INTA_IRQCHIP select TI_K3_SOCINFO help
drivers/irqchip/Kconfig +2 -1
@@ -533,9 +533,10 @@ config LS1X_IRQ Support for the Loongson-1 platform Interrupt Controller. config TI_SCI_INTR_IRQCHIP - bool + tristate "TI SCI INTR Interrupt Controller" depends on TI_SCI_PROTOCOL select IRQ_DOMAIN_HIERARCHY + default ARCH_K3 help This enables the irqchip driver support for K3 Interrupt router over TI System Control Interface available on some new TI's SoCs.
drivers/irqchip/irq-ti-sci-intr.c +1 -0
@@ -303,3 +303,4 @@ module_platform_driver(ti_sci_intr_irq_domain_driver);MODULE_AUTHOR ("Lokesh Vutla <lokeshvutla@ticom>" );MODULE_DESCRIPTION ("K3 Interrupt Router driver over TI SCI protocol" ); +MODULE_LICENSE ("GPL" );
Signature · 1 line
2.34.1
PATCH v3 2/2 irqchip: Kconfig: Added module build support for the TI interrupt aggregator
In reply to Guillaume La RoqueFrom: Nicolas Frayer <[email protected]>
Added module build support in Kconfig for the TI SCI interrupt aggregator driver. The driver's default build is built-in and it also depends on ARCH_K3 as the driver uses some 64 bit ops and should only be built for 64 bit platforms.
--- arch/arm64/Kconfig.platforms | 1 - drivers/irqchip/Kconfig | 5 +++-- drivers/irqchip/irq-ti-sci-inta.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)
arch/arm64/Kconfig.platforms +0 -1
@@ -135,7 +135,6 @@ config ARCH_K3 select SOC_TI select TI_MESSAGE_MANAGER select TI_SCI_PROTOCOL - select TI_SCI_INTA_IRQCHIP select TI_K3_SOCINFO help This enables support for Texas Instruments' K3 multicore SoC
drivers/irqchip/Kconfig +3 -2
@@ -544,10 +544,11 @@ config TI_SCI_INTR_IRQCHIP TI System Controller, say Y here. Otherwise, say N. config TI_SCI_INTA_IRQCHIP - bool - depends on TI_SCI_PROTOCOL + tristate "TI SCI INTA Interrupt Controller" + depends on ARCH_K3 && TI_SCI_PROTOCOL select IRQ_DOMAIN_HIERARCHY select TI_SCI_INTA_MSI_DOMAIN + default ARCH_K3 help This enables the irqchip driver support for K3 Interrupt aggregator over TI System Control Interface available on some new TI's SoCs.
drivers/irqchip/irq-ti-sci-inta.c +1 -0
@@ -743,3 +743,4 @@ module_platform_driver(ti_sci_inta_irq_domain_driver);MODULE_AUTHOR ("Lokesh Vutla <[email protected]>" );MODULE_DESCRIPTION ("K3 Interrupt Aggregator driver over TI SCI protocol" ); +MODULE_LICENSE ("GPL" );
Signature · 1 line
2.34.1
Re: [PATCH v3 1/2] irqchip: Kconfig: module build support for the TI interrupt router driver
In reply to Guillaume La RoqueQuoted 30 lines · Guillaume La Roque
From: Nicolas Frayer <[email protected]>
Added module build support in
Kconfigfor the TI SCI interrupt router driverSigned-off-by Nicolas Frayer <[email protected]>Signed-off-by Guillaume La Roque <[email protected]>--- arch/arm64/Kconfig.platforms | 1 - drivers/irqchip/Kconfig | 3 ++- drivers/irqchip/irq-ti-sci-intr.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)arch/arm64/Kconfig.platforms +0
-1@@ -135,7 +135,6 @@ config ARCH_K3 select SOC_TI select TI_MESSAGE_MANAGER select TI_SCI_PROTOCOL - select TI_SCI_INTR_IRQCHIP select TI_SCI_INTA_IRQCHIP select TI_K3_SOCINFO helpdrivers/irqchip/Kconfig +0
-0
drivers/irqchip/Kconfig config LS1X_IRQ · line 536
Quoted 5 lines
drivers/irqchip/Kconfig +1
-1@@ -533,9 +533,10 @@ config LS1X_IRQ Support for the Loongson-1 platform Interrupt Controller. config TI_SCI_INTR_IRQCHIP - bool + tristate "TI SCI INTR Interrupt Controller"
Although not needed, might be good to gate this on ARCH_K3 as it only makes sense to add when K3 is an enabled platform. Then add on compile test support:
depends on ARCH_K3 || COMPILE_TEST
Andrew
Quoted 16 lines
drivers/irqchip/Kconfig +1
-0depends on TI_SCI_PROTOCOL select IRQ_DOMAIN_HIERARCHY + default ARCH_K3 help This enables the irqchip driver support for K3 Interrupt router over TI System Control Interface available on some new TI's SoCs.drivers/irqchip/irq-ti-sci-intr.c +1
-0@@ -303,3 +303,4 @@ module_platform_driver(ti_sci_intr_irq_domain_driver);MODULE_AUTHOR ("Lokesh Vutla <lokeshvutla@ticom>" );MODULE_DESCRIPTION ("K3 Interrupt Router driver over TI SCI protocol" ); +MODULE_LICENSE ("GPL" );
Re: [PATCH v3 2/2] irqchip: Kconfig: Added module build support for the TI interrupt aggregator
In reply to Guillaume La RoqueQuoted 32 lines · Guillaume La Roque
From: Nicolas Frayer <[email protected]>
Added module build support in
Kconfigfor the TI SCI interrupt aggregator driver. The driver's default build is built-in and it also depends onARCH_K3as the driver uses some 64 bit ops and should only be built for 64 bit platforms.Signed-off-by Nicolas Frayer <[email protected]>Signed-off-by Guillaume La Roque <[email protected]>--- arch/arm64/Kconfig.platforms | 1 - drivers/irqchip/Kconfig | 5 +++-- drivers/irqchip/irq-ti-sci-inta.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)arch/arm64/Kconfig.platforms +0
-1@@ -135,7 +135,6 @@ config ARCH_K3 select SOC_TI select TI_MESSAGE_MANAGER select TI_SCI_PROTOCOL - select TI_SCI_INTA_IRQCHIP select TI_K3_SOCINFO help This enables support for Texas Instruments' K3 multicore SoCdrivers/irqchip/Kconfig +0
-0
drivers/irqchip/Kconfig config TI_SCI_INTR_IRQCHIP · line 548
Quoted 7 lines
drivers/irqchip/Kconfig +2
-2@@ -544,10 +544,11 @@ config TI_SCI_INTR_IRQCHIP TI System Controller, say Y here. Otherwise, say N. config TI_SCI_INTA_IRQCHIP - bool - depends on TI_SCI_PROTOCOL + tristate "TI SCI INTA Interrupt Controller" + depends on ARCH_K3 && TI_SCI_PROTOCOL
You can still compile test, just gate it on 64BIT (or ARM64 if those 64bit ops are only available on ARM64).
depends on ARCH_K3 || (COMPILE_TEST && ARM64)
BTW, the last time this was posted the feedback was that if this was compiled as a module we might have issues with dependent drivers not having this IRQ ready as it may be loaded later. I think this would only cause probe defers if the drivers are well behaving, but something to double check.
Andrew
Quoted 16 lines
drivers/irqchip/Kconfig +1
-0select IRQ_DOMAIN_HIERARCHY select TI_SCI_INTA_MSI_DOMAIN + default ARCH_K3 help This enables the irqchip driver support for K3 Interrupt aggregator over TI System Control Interface available on some new TI's SoCs.drivers/irqchip/irq-ti-sci-inta.c +1
-0@@ -743,3 +743,4 @@ module_platform_driver(ti_sci_inta_irq_domain_driver);MODULE_AUTHOR ("Lokesh Vutla <[email protected]>" );MODULE_DESCRIPTION ("K3 Interrupt Aggregator driver over TI SCI protocol" ); +MODULE_LICENSE ("GPL" );
Re: [PATCH v3 1/2] irqchip: Kconfig: module build support for the TI interrupt router driver
In reply to Andrew DavisHi Andrew,
Le 16/10/2024 à 15:37, Andrew Davis a écrit :
Quoted 30 lines · Guillaume La Roque
Quoted 29 lines
From: Nicolas Frayer <[email protected]>
Added module build support in
Kconfigfor the TI SCI interrupt router driverSigned-off-by Nicolas Frayer <[email protected]>Signed-off-by Guillaume La Roque <[email protected]>---
arch/arm64/Kconfig.platforms | 1 -
drivers/irqchip/Kconfig | 3 ++-
drivers/irqchip/irq-ti-sci-intr.c| 1 +3 files changed, 3 insertions(+), 2 deletions(-)arch/arm64/Kconfig.platforms +0
-0@@ -135,7 +135,6 @@ config ARCH_K3select
SOC_TI
selectTI_MESSAGE_MANAGER
selectTI_SCI_PROTOCOL
- selectTI_SCI_INTR_IRQCHIP
selectTI_SCI_INTA_IRQCHIP
selectTI_K3_SOCINFO
helpdrivers/irqchip/Kconfig +0
-0
Quoted 8 lines
Quoted 5 lines
drivers/irqchip/Kconfig +0
-0@@ -533,9 +533,10 @@ config LS1X_IRQSupport for the Loongson-1 platform Interrupt Controller. config
TI_SCI_INTR_IRQCHIP
- bool
+ tristate "TI SCI INTR Interrupt Controller"Although not needed, might be good to gate this on
ARCH_K3as it only makes sense to add when K3 is an enabled platform.
Actually if ARCH_K3 is not selected it's not possible to enable TI IRQCHIP driver from menuconfig so depends look good or do you want to have when i select irqchip driver ARCH_K3 is enabled ?
Quoted 4 lines
Then add on compile test support:
depends on
ARCH_K3||COMPILE_TEST
i will add in v4.
thanks for review
Guillaume
Quoted 18 lines
Andrew
Quoted 16 lines
depends on
TI_SCI_PROTOCOL
selectIRQ_DOMAIN_HIERARCHY
+ defaultARCH_K3
help
This enables the irqchip driver support for K3 Interrupt router over TI System Control Interface available on some new TI's SoCs.drivers/irqchip/irq-ti-sci-intr.c +1
-0@@ -303,3 +303,4 @@module_platform_driver (ti_sci_intr_irq_domain_driver); MODULE_AUTHOR("Lokesh Vutla <lokeshvutla@ticom>"); MODULE_DESCRIPTION("K3 Interrupt Router driver over TI SCI protocol"); +MODULE_LICENSE ("GPL" );
Re: [PATCH v3 1/2] irqchip: Kconfig: module build support for the TI interrupt router driver
Quoted 42 lines · Guillaume LA ROQUE
Hi Andrew,
Le 16/10/2024 à 15:37, Andrew Davis a écrit :
Quoted 30 lines · Guillaume La Roque
Quoted 29 lines
From: Nicolas Frayer <[email protected]>
Added module build support in
Kconfigfor the TI SCI interrupt router driverSigned-off-by Nicolas Frayer <[email protected]>Signed-off-by Guillaume La Roque <[email protected]>---
arch/arm64/Kconfig.platforms | 1 -
drivers/irqchip/Kconfig | 3 ++-
drivers/irqchip/irq-ti-sci-intr.c| 1 +3 files changed, 3 insertions(+), 2 deletions(-)arch/arm64/Kconfig.platforms +0
-0@@ -135,7 +135,6 @@ config ARCH_K3select
SOC_TI
selectTI_MESSAGE_MANAGER
selectTI_SCI_PROTOCOL
- selectTI_SCI_INTR_IRQCHIP
selectTI_SCI_INTA_IRQCHIP
selectTI_K3_SOCINFO
helpdrivers/irqchip/Kconfig +0
-0Quoted 8 lines
Quoted 5 lines
drivers/irqchip/Kconfig +0
-0@@ -533,9 +533,10 @@ config LS1X_IRQSupport for the Loongson-1 platform Interrupt Controller. config
TI_SCI_INTR_IRQCHIP
- bool
+ tristate "TI SCI INTR Interrupt Controller"Although not needed, might be good to gate this on
ARCH_K3as it only makes sense to add when K3 is an enabled platform.
Quoted 2 lines
Actually if
ARCH_K3is not selected it's not possible to enable TI IRQCHIP driver from menuconfig so depends look good or do you want to have when i select irqchip driverARCH_K3is enabled ?
Just adding the below "depends on" is fine, no need to select or change anything else.
Andrew
Quoted 27 lines
Quoted 4 lines
Then add on compile test support:
depends on
ARCH_K3||COMPILE_TESTi will add in v4.
thanks for review
Guillaume
Quoted 17 lines
Andrew
Quoted 15 lines
depends on
TI_SCI_PROTOCOL
selectIRQ_DOMAIN_HIERARCHY
+ defaultARCH_K3
help
This enables the irqchip driver support for K3 Interrupt router over TI System Control Interface available on some new TI's SoCs.drivers/irqchip/irq-ti-sci-intr.c +1
-0@@ -303,3 +303,4 @@ module_platform_driver(ti_sci_intr_irq_domain_driver); MODULE_AUTHOR("Lokesh Vutla <lokeshvutla@ticom>"); MODULE_DESCRIPTION("K3 Interrupt Router driver over TI SCI protocol"); +MODULE_LICENSE ("GPL" );
Re: [PATCH v3 1/2] irqchip: Kconfig: module build support for the TI interrupt router driver
In reply to Guillaume La RoqueQuoted 1 line · Guillaume La Roque
From: Nicolas Frayer <[email protected]>
irqchip: Kconfig: is not a valid prefix.
This is about the TI SCI router, so this wants to use the irqchip/ti-whatever prefix.
Quoted 3 lines
Added module build support in
Kconfigfor the TI SCI interrupt router driver
Added?
This wants to be 'Add ...'
You fail to explain why it is valid to build this as a module, i.e. you did the analysis that there is no dependency on this before modules can be loaded.
Quoted 3 lines
MODULE_AUTHOR("Lokesh Vutla <lokeshvutla@ticom>");MODULE_DESCRIPTION("K3 Interrupt Router driver over TI SCI protocol");
+MODULE_LICENSE("GPL");
This change is not mentioned in the change log.
Thanks,
tglx
Re: [PATCH v3 1/2] irqchip: Kconfig: module build support for the TI interrupt router driver
Hi ,
Le 16/10/2024 à 18:38, Thomas Gleixner a écrit :
Quoted 9 lines · Guillaume La Roque
Quoted 1 line
From: Nicolas Frayer <[email protected]>
irqchip:
Kconfig: is not a valid prefix.This is about the TI SCI router, so this wants to use the irqchip/ti-whatever prefix.
Quoted 2 lines
Added module build support in
Kconfigfor the TI SCI interrupt router driver
Quoted 7 lines
Added?
This wants to be 'Add ...'
You fail to explain why it is valid to build this as a module, i.e. you did the analysis that there is no dependency on this before modules can be loaded.
i will rewrite commit message and title .
Quoted 5 lines
Quoted 4 lines
MODULE_AUTHOR("Lokesh Vutla <lokeshvutla@ticom>");MODULE_DESCRIPTION("K3 Interrupt Router driver over TI SCI protocol");
+MODULE_LICENSE("GPL");This change is not mentioned in the change log.
it's mandatory for have possiblity to build in module so for me no really needed to explain this but i will add why in commit message.
thanks for review.
Guillaume
Quoted 4 lines
Thanks,
tglx
Re: [PATCH v3 2/2] irqchip: Kconfig: Added module build support for the TI interrupt aggregator
In reply to Andrew DavisLe 16/10/2024 à 15:48, Andrew Davis a écrit :
Quoted 43 lines · Guillaume La Roque
Quoted 32 lines
From: Nicolas Frayer <[email protected]>
Added module build support in
Kconfigfor the TI SCI interrupt aggregator driver. The driver's default build is built-in and it also depends onARCH_K3as the driver uses some 64 bit ops and should only be built for 64 bit platforms.Signed-off-by Nicolas Frayer <[email protected]>Signed-off-by Guillaume La Roque <[email protected]>---
arch/arm64/Kconfig.platforms | 1 -
drivers/irqchip/Kconfig | 5 +++--
drivers/irqchip/irq-ti-sci-inta.c| 1 +3 files changed, 4 insertions(+), 3 deletions(-)arch/arm64/Kconfig.platforms +0
-0@@ -135,7 +135,6 @@ config ARCH_K3select
SOC_TI
selectTI_MESSAGE_MANAGER
selectTI_SCI_PROTOCOL
- selectTI_SCI_INTA_IRQCHIP
selectTI_K3_SOCINFO
help
This enables support for Texas Instruments' K3 multicore SoCdrivers/irqchip/Kconfig +0
-0@@ -544,10 +544,11 @@ config TI_SCI_INTR_IRQCHIPQuoted 6 lines
TI System Controller, say Y here. Otherwise, say N. config
TI_SCI_INTA_IRQCHIP
- bool
- depends onTI_SCI_PROTOCOL
+ tristate "TI SCI INTA Interrupt Controller"
+ depends onARCH_K3&&TI_SCI_PROTOCOLYou can still compile test, just gate it on 64BIT (or ARM64 if those 64bit ops are only available on ARM64).
Quoted 7 lines
depends on
ARCH_K3|| (COMPILE_TEST&& ARM64)BTW, the last time this was posted the feedback was that if this was compiled as a module we might have issues with dependent drivers not having this IRQ ready as it may be loaded later. I think this would only cause probe defers if the drivers are well behaving, but something to double check.
we already use this patch in android kernel mainline and 6.6 without issue to load all drivers.
i will try with your yocto sdk before post v4 to confirm it's still OK.
Guillaume
Quoted 19 lines
Andrew
Quoted 16 lines
select
IRQ_DOMAIN_HIERARCHY
selectTI_SCI_INTA_MSI_DOMAIN
+ defaultARCH_K3
help
This enables the irqchip driver support for K3 Interrupt aggregator over TI System Control Interface available on some new TI's SoCs.drivers/irqchip/irq-ti-sci-inta.c +1
-0@@ -743,3 +743,4 @@module_platform_driver (ti_sci_inta_irq_domain_driver); MODULE_AUTHOR("Lokesh Vutla <[email protected]>"); MODULE_DESCRIPTION("K3 Interrupt Aggregator driver over TI SCI protocol"); +MODULE_LICENSE ("GPL" );