All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] irqchip: LoongArch: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
@ 2022-10-27  3:39 Tiezhu Yang
  2022-11-26 12:53 ` Marc Zyngier
  0 siblings, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2022-10-27  3:39 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier; +Cc: linux-kernel

An IRQ's effective affinity can only be different from its configured
affinity if there are multiple CPUs. Make it clear that this option is
only meaningful when SMP is enabled.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---

v2: rebased on 6.1-rc2

 drivers/irqchip/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 7ef9f5e..8461915 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -575,7 +575,7 @@ config IRQ_LOONGARCH_CPU
 	bool
 	select GENERIC_IRQ_CHIP
 	select IRQ_DOMAIN
-	select GENERIC_IRQ_EFFECTIVE_AFF_MASK
+	select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
 	select LOONGSON_LIOINTC
 	select LOONGSON_EIOINTC
 	select LOONGSON_PCH_PIC
-- 
2.1.0


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

* Re: [PATCH v2] irqchip: LoongArch: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
  2022-10-27  3:39 [PATCH v2] irqchip: LoongArch: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP Tiezhu Yang
@ 2022-11-26 12:53 ` Marc Zyngier
  2022-11-26 23:49   ` Samuel Holland
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Zyngier @ 2022-11-26 12:53 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Thomas Gleixner, linux-kernel

On Thu, 27 Oct 2022 04:39:09 +0100,
Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
> 
> An IRQ's effective affinity can only be different from its configured
> affinity if there are multiple CPUs. Make it clear that this option is
> only meaningful when SMP is enabled.
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> 
> v2: rebased on 6.1-rc2
> 
>  drivers/irqchip/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 7ef9f5e..8461915 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -575,7 +575,7 @@ config IRQ_LOONGARCH_CPU
>  	bool
>  	select GENERIC_IRQ_CHIP
>  	select IRQ_DOMAIN
> -	select GENERIC_IRQ_EFFECTIVE_AFF_MASK
> +	select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
>  	select LOONGSON_LIOINTC
>  	select LOONGSON_EIOINTC
>  	select LOONGSON_PCH_PIC

We already have this:

# Supports effective affinity mask
config GENERIC_IRQ_EFFECTIVE_AFF_MASK
       depends on SMP
       bool

Do we really need to express this for every interrupt controller?

	M.

-- 
Without deviation from the norm, progress is not possible.

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

* Re: [PATCH v2] irqchip: LoongArch: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
  2022-11-26 12:53 ` Marc Zyngier
@ 2022-11-26 23:49   ` Samuel Holland
  2022-11-28  9:52     ` Marc Zyngier
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Holland @ 2022-11-26 23:49 UTC (permalink / raw)
  To: Marc Zyngier, Tiezhu Yang; +Cc: Thomas Gleixner, linux-kernel

On 11/26/22 06:53, Marc Zyngier wrote:
> On Thu, 27 Oct 2022 04:39:09 +0100,
> Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>>
>> An IRQ's effective affinity can only be different from its configured
>> affinity if there are multiple CPUs. Make it clear that this option is
>> only meaningful when SMP is enabled.
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>> ---
>>
>> v2: rebased on 6.1-rc2
>>
>>  drivers/irqchip/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
>> index 7ef9f5e..8461915 100644
>> --- a/drivers/irqchip/Kconfig
>> +++ b/drivers/irqchip/Kconfig
>> @@ -575,7 +575,7 @@ config IRQ_LOONGARCH_CPU
>>  	bool
>>  	select GENERIC_IRQ_CHIP
>>  	select IRQ_DOMAIN
>> -	select GENERIC_IRQ_EFFECTIVE_AFF_MASK
>> +	select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
>>  	select LOONGSON_LIOINTC
>>  	select LOONGSON_EIOINTC
>>  	select LOONGSON_PCH_PIC
> 
> We already have this:
> 
> # Supports effective affinity mask
> config GENERIC_IRQ_EFFECTIVE_AFF_MASK
>        depends on SMP
>        bool
> 
> Do we really need to express this for every interrupt controller?

Unfortunately yes, because "select" does not respect dependencies. So
the "depends on SMP" line does not enforce anything; it only serves to
provide a warning at configure time that the build will break.

Regards,
Samuel


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

* Re: [PATCH v2] irqchip: LoongArch: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
  2022-11-26 23:49   ` Samuel Holland
@ 2022-11-28  9:52     ` Marc Zyngier
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2022-11-28  9:52 UTC (permalink / raw)
  To: Samuel Holland; +Cc: Tiezhu Yang, Thomas Gleixner, linux-kernel

On Sat, 26 Nov 2022 23:49:10 +0000,
Samuel Holland <samuel@sholland.org> wrote:
> 
> On 11/26/22 06:53, Marc Zyngier wrote:
> > On Thu, 27 Oct 2022 04:39:09 +0100,
> > Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
> >>
> >> An IRQ's effective affinity can only be different from its configured
> >> affinity if there are multiple CPUs. Make it clear that this option is
> >> only meaningful when SMP is enabled.
> >>
> >> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> >> ---
> >>
> >> v2: rebased on 6.1-rc2
> >>
> >>  drivers/irqchip/Kconfig | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> >> index 7ef9f5e..8461915 100644
> >> --- a/drivers/irqchip/Kconfig
> >> +++ b/drivers/irqchip/Kconfig
> >> @@ -575,7 +575,7 @@ config IRQ_LOONGARCH_CPU
> >>  	bool
> >>  	select GENERIC_IRQ_CHIP
> >>  	select IRQ_DOMAIN
> >> -	select GENERIC_IRQ_EFFECTIVE_AFF_MASK
> >> +	select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
> >>  	select LOONGSON_LIOINTC
> >>  	select LOONGSON_EIOINTC
> >>  	select LOONGSON_PCH_PIC
> > 
> > We already have this:
> > 
> > # Supports effective affinity mask
> > config GENERIC_IRQ_EFFECTIVE_AFF_MASK
> >        depends on SMP
> >        bool
> > 
> > Do we really need to express this for every interrupt controller?
> 
> Unfortunately yes, because "select" does not respect dependencies. So
> the "depends on SMP" line does not enforce anything; it only serves to
> provide a warning at configure time that the build will break.

I understand that. My question was more "how can we avoid doing that
for each and every irqchip".

So far, the only things I can think of are either an intermediate
config symbol that performs the "if SMP" by itself, or spraying checks
for CONFIG_SMP all over the shop. None of which are appealing.

	M.

-- 
Without deviation from the norm, progress is not possible.

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

end of thread, other threads:[~2022-11-28  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27  3:39 [PATCH v2] irqchip: LoongArch: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP Tiezhu Yang
2022-11-26 12:53 ` Marc Zyngier
2022-11-26 23:49   ` Samuel Holland
2022-11-28  9:52     ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.