diff mbox series

[v3,1/2] irqchip: Kconfig: module build support for the TI interrupt router driver

Message ID 20241016-timodules-v3-1-fa71091ade98@baylibre.com (mailing list archive)
State New, archived
Headers show
Series irqchip: Kconfig: Add module support for TI inta/intr | expand

Commit Message

Guillaume LA ROQUE Oct. 16, 2024, 9:41 a.m. UTC
From: Nicolas Frayer <nfrayer@baylibre.com>

Added module build support in Kconfig for the TI SCI interrupt router
driver

Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
 arch/arm64/Kconfig.platforms      | 1 -
 drivers/irqchip/Kconfig           | 3 ++-
 drivers/irqchip/irq-ti-sci-intr.c | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

Comments

Andrew Davis Oct. 16, 2024, 1:37 p.m. UTC | #1
On 10/16/24 4:41 AM, Guillaume La Roque wrote:
> From: Nicolas Frayer <nfrayer@baylibre.com>
> 
> Added module build support in Kconfig for the TI SCI interrupt router
> driver
> 
> Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com>
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> ---
>   arch/arm64/Kconfig.platforms      | 1 -
>   drivers/irqchip/Kconfig           | 3 ++-
>   drivers/irqchip/irq-ti-sci-intr.c | 1 +
>   3 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index 6c6d11536b42..393845a3ae5c 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -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
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 341cd9ca5a05..a958731404e9 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -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

>   	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.
> diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c
> index c027cd9e4a69..b49a73106c69 100644
> --- a/drivers/irqchip/irq-ti-sci-intr.c
> +++ b/drivers/irqchip/irq-ti-sci-intr.c
> @@ -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");
>
Guillaume LA ROQUE Oct. 16, 2024, 2:18 p.m. UTC | #2
Hi Andrew,

Le 16/10/2024 à 15:37, Andrew Davis a écrit :
> On 10/16/24 4:41 AM, Guillaume La Roque wrote:
>> From: Nicolas Frayer <nfrayer@baylibre.com>
>>
>> Added module build support in Kconfig for the TI SCI interrupt router
>> driver
>>
>> Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com>
>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
>> ---
>>   arch/arm64/Kconfig.platforms      | 1 -
>>   drivers/irqchip/Kconfig           | 3 ++-
>>   drivers/irqchip/irq-ti-sci-intr.c | 1 +
>>   3 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
>> index 6c6d11536b42..393845a3ae5c 100644
>> --- a/arch/arm64/Kconfig.platforms
>> +++ b/arch/arm64/Kconfig.platforms
>> @@ -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
>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
>> index 341cd9ca5a05..a958731404e9 100644
>> --- a/drivers/irqchip/Kconfig
>> +++ b/drivers/irqchip/Kconfig
>> @@ -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.

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 ?

> Then add on compile test support:
>
> depends on ARCH_K3 || COMPILE_TEST
>
i will add in v4.

thanks for review

Guillaume
> Andrew
>
>>       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.
>> diff --git a/drivers/irqchip/irq-ti-sci-intr.c 
>> b/drivers/irqchip/irq-ti-sci-intr.c
>> index c027cd9e4a69..b49a73106c69 100644
>> --- a/drivers/irqchip/irq-ti-sci-intr.c
>> +++ b/drivers/irqchip/irq-ti-sci-intr.c
>> @@ -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");
>>
Andrew Davis Oct. 16, 2024, 2:26 p.m. UTC | #3
On 10/16/24 9:18 AM, Guillaume LA ROQUE wrote:
> Hi Andrew,
> 
> Le 16/10/2024 à 15:37, Andrew Davis a écrit :
>> On 10/16/24 4:41 AM, Guillaume La Roque wrote:
>>> From: Nicolas Frayer <nfrayer@baylibre.com>
>>>
>>> Added module build support in Kconfig for the TI SCI interrupt router
>>> driver
>>>
>>> Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com>
>>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
>>> ---
>>>   arch/arm64/Kconfig.platforms      | 1 -
>>>   drivers/irqchip/Kconfig           | 3 ++-
>>>   drivers/irqchip/irq-ti-sci-intr.c | 1 +
>>>   3 files changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
>>> index 6c6d11536b42..393845a3ae5c 100644
>>> --- a/arch/arm64/Kconfig.platforms
>>> +++ b/arch/arm64/Kconfig.platforms
>>> @@ -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
>>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
>>> index 341cd9ca5a05..a958731404e9 100644
>>> --- a/drivers/irqchip/Kconfig
>>> +++ b/drivers/irqchip/Kconfig
>>> @@ -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.
> 
> 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 ?
> 

Just adding the below "depends on" is fine, no need to select
or change anything else.

Andrew

>> Then add on compile test support:
>>
>> depends on ARCH_K3 || COMPILE_TEST
>>
> i will add in v4.
> 
> thanks for review
> 
> Guillaume
>> Andrew
>>
>>>       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.
>>> diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c
>>> index c027cd9e4a69..b49a73106c69 100644
>>> --- a/drivers/irqchip/irq-ti-sci-intr.c
>>> +++ b/drivers/irqchip/irq-ti-sci-intr.c
>>> @@ -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");
>>>
>
Thomas Gleixner Oct. 16, 2024, 4:38 p.m. UTC | #4
On Wed, Oct 16 2024 at 11:41, Guillaume La Roque wrote:
> From: Nicolas Frayer <nfrayer@baylibre.com>

irqchip: Kconfig: is not a valid prefix.

This is about the TI SCI router, so this wants to use the
irqchip/ti-whatever prefix.

>
> Added module build support in Kconfig for 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.

>  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
Guillaume LA ROQUE Oct. 16, 2024, 6:32 p.m. UTC | #5
Hi ,

Le 16/10/2024 à 18:38, Thomas Gleixner a écrit :
> On Wed, Oct 16 2024 at 11:41, Guillaume La Roque wrote:
>> From: Nicolas Frayer <nfrayer@baylibre.com>
> irqchip: Kconfig: is not a valid prefix.
>
> This is about the TI SCI router, so this wants to use the
> irqchip/ti-whatever prefix.
>
>> Added module build support in Kconfig for 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.


i will rewrite commit message and title .

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

>
> Thanks,
>
>          tglx
diff mbox series

Patch

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 6c6d11536b42..393845a3ae5c 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -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
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 341cd9ca5a05..a958731404e9 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -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.
diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c
index c027cd9e4a69..b49a73106c69 100644
--- a/drivers/irqchip/irq-ti-sci-intr.c
+++ b/drivers/irqchip/irq-ti-sci-intr.c
@@ -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");