Message ID | 1666841949-5244-1-git-send-email-yangtiezhu@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp13469wru; Wed, 26 Oct 2022 20:56:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jbfk+7Us5VtfjcQkv+vG3Ziq9MyX7QmKO1iKL4YxdKcx6+TkBOMFAgfc+7Xf51adQZFgg X-Received: by 2002:a05:6402:518f:b0:461:c252:c3b3 with SMTP id q15-20020a056402518f00b00461c252c3b3mr18341653edd.29.1666842995106; Wed, 26 Oct 2022 20:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666842995; cv=none; d=google.com; s=arc-20160816; b=epK7IwULIxapqwNk+4ltnZqQgmEs84LxcRC9bxGF2Bz3cMb7vQAhGa/yDYHakEnuvs uMSg8P0kgxX04klcyIGdj2kKsrkLnYspF1SQmsDjFwH6Jw9etJpal0MM8jg1DnM2pjuu 4ZlA8Y9T6zQxPwKyLQplBeGegZUgdXWZX7vbEWxC3SR3tyA9bhsEJkyswx8LzlrnD0L4 8M3Mxuo/m1I+XqFWB+Qv7UWhQgoOvlJuQxIrqscN5lBSsGPuqBZlm5UEEopRZisX7KJ7 Gs32N5hzu3T8AHUFRIxeLI2ZW7E0RclMDTYKr1AhXXF72QM2G6wWhsSlO5QtN7OMHpy8 o/1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=DrGFEbidWE2z3VNNN3AScmOwCj/cUmTKtmmFLfirylw=; b=eC/lSuoW80a0y1yViGIqKPnX9HwjVH/+HKw5X0T5Y46XDqW7FmkP3tgNJgf/wNRFwP pKoIH6G3BcGCm7T2Jgfsm/VfeB3My7v1xxU2Kj2vTKzQeYBqG9Y59TVliP5eWn/gpoh3 G7uf0elhML1QiABbpmXHRxqpBLHgGRddCAaFcBm7PzsKz8g051yq9ZrXqPXoLiIVQ3yL 6PRGDufrMnmk2AiPwXa/Cb7X7jNKOTif9F/7Uo5BeoItqQ/xnpyZZfJJ5VRhDoh2PorQ KM99hxJrpCZamY/O8BkM0g8/zNNUbErOmdS1cffoTZ2fdaxyM9rG3QzFqFNMF7UC7wbr CKbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m21-20020a056402431500b00461d2ed78afsi521223edc.563.2022.10.26.20.56.05; Wed, 26 Oct 2022 20:56:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233817AbiJ0DjQ (ORCPT <rfc822;hiifong.im@gmail.com> + 99 others); Wed, 26 Oct 2022 23:39:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233481AbiJ0DjN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Oct 2022 23:39:13 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 787E34CA26 for <linux-kernel@vger.kernel.org>; Wed, 26 Oct 2022 20:39:11 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Dxvrde_VljdMQCAA--.5689S3; Thu, 27 Oct 2022 11:39:10 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dxr+Bd_VljmpAFAA--.20479S2; Thu, 27 Oct 2022 11:39:09 +0800 (CST) From: Tiezhu Yang <yangtiezhu@loongson.cn> To: Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org> Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2] irqchip: LoongArch: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP Date: Thu, 27 Oct 2022 11:39:09 +0800 Message-Id: <1666841949-5244-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf8Dxr+Bd_VljmpAFAA--.20479S2 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvdXoW7GFW3XryxGFy7XF13uF1rJFb_yoW3Cwc_Cr W2vFs7C3WUCryUAryIvr4fZryjkan0gFs7ua1qv345Xw1xZr13JF4UtFn8XrsrGa1UKF1S vrWIkr129w1IvjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY 17kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUGVWUXwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26r1I6r4UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7 xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAS 0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s 026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_ JrI_JrWlx4CE17CEb7AF67AKxVWUXVWUAwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14 v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xva j40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJV W8JbIYCTnIWIevJa73UjIFyTuYvjxUzZ2-UUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747811560193951339?= X-GMAIL-MSGID: =?utf-8?q?1747811560193951339?= |
Series |
[v2] irqchip: LoongArch: Select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP
|
|
Commit Message
Tiezhu Yang
Oct. 27, 2022, 3:39 a.m. UTC
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(-)
Comments
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.
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
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.
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