From patchwork Sat Oct 9 02:20:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547077 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4891C433FE for ; Sat, 9 Oct 2021 02:20:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B374360F90 for ; Sat, 9 Oct 2021 02:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244337AbhJICWb (ORCPT ); Fri, 8 Oct 2021 22:22:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244234AbhJICW1 (ORCPT ); Fri, 8 Oct 2021 22:22:27 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEFBFC061755; Fri, 8 Oct 2021 19:20:30 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id k8so1850156pls.3; Fri, 08 Oct 2021 19:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=znmARRiQVkqC85lKLifIrCv0U2JcIdQKNsLQ6jRH+xY=; b=HuYOJMsuZ5Li1XRjQJpwwVLmkPRJfGKnjBoRjBAS5zeqnc8lCWIKTWTvwbCvJ+o4ZI +RQdB5JwpQaPDtiOy5+m8gnQRWXS85ZK+5nMSrR/lx8mp5xPEkfpH/GS4kopN/na2yjJ 29DMDXouNvov8TA+Am+SPb8wzBAtsN84V6iiF+9CdzLwUIqB18URDBIncmoB3MQyieX8 4lMSZQVgu0HOEPdvSDpEjcyXSNy/k6gSaJXSrtTRyYmuWRbCVzpJu5JmMxpExAhcfQPz 5FGqZYZEi3gi6Fo4cuwjI7pOBfDN8qmpnIwkiYGNk8nFC5C9P6mz8rreMrCGpx4DUzoQ /yuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=znmARRiQVkqC85lKLifIrCv0U2JcIdQKNsLQ6jRH+xY=; b=qg5m4QNiU3IuoGiZpiukB47ENk4ITGyJAjil2spsbAwllJbRcDzrjk5fvgkrPkAQPa 4iazWY188DP8hcNfv/4wL4wyVYJdLhrz5Ud7BOI4TVfK7mizLWiTvdGyd5Fu3j/Okh1Y FzPUlh3PE7vWJQcgMMZAn7PGADcI8L7yJx8zAHuvgul1mZd5GMVehF7toTS06okoXb6J snSm333mvrWway9N9fbakO+2IYgaVho8TP+akXLITJi9HAh7WdPIKKV2CylqDoKDfIzQ nUD3vOYAoNT4YKnSfQlmfuqoE9s98AQ4oD4Ke9FMvL7H4eZ4DJZe5uaR7dvLEryF4uNC ruhA== X-Gm-Message-State: AOAM532m0JyNWUeX2hezcvN2UY+Cy4VD1R89g00WAZn6FYori9a5FXO5 Nif1sEtga5h7IZMHYLzO2WYtqDl+CA4= X-Google-Smtp-Source: ABdhPJynV9gKczr8GslI4IAihm3p6jxKMIoLFMgQtYbWS/Y0NWCgFTjd2R0DmPdtmlaURv8r5n4D9w== X-Received: by 2002:a17:902:e793:b0:13b:9cae:5dcd with SMTP id cp19-20020a170902e79300b0013b9cae5dcdmr12772844plb.53.1633746030043; Fri, 08 Oct 2021 19:20:30 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:29 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Thomas Gleixner , Thomas Bogendoerfer , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 01/14] MIPS: BMIPS: Remove use of irq_cpu_offline Date: Fri, 8 Oct 2021 19:20:10 -0700 Message-Id: <20211009022023.3796472-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org irq_cpu_offline() is only used by MIPS and we should instead use irq_migrate_all_off_this_cpu(). This will be helpful in order to remove drivers/irqchip/irq-bcm7038-l1.c irq_cpu_offline callback which would have got in the way of making this driver modular. Suggested-by: Thomas Gleixner Acked-by: Thomas Bogendoerfer Signed-off-by: Florian Fainelli --- arch/mips/Kconfig | 1 + arch/mips/kernel/smp-bmips.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 771ca53af06d..2c03b27cec02 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1782,6 +1782,7 @@ config CPU_BMIPS select CPU_HAS_PREFETCH select CPU_SUPPORTS_CPUFREQ select MIPS_EXTERNAL_TIMER + select GENERIC_IRQ_MIGRATION if HOTPLUG_CPU help Support for BMIPS32/3300/4350/4380 and BMIPS5000 processors. diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index b6ef5f7312cf..f5d7bfa3472a 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -373,7 +374,7 @@ static int bmips_cpu_disable(void) set_cpu_online(cpu, false); calculate_cpu_foreign_map(); - irq_cpu_offline(); + irq_migrate_all_off_this_cpu(); clear_c0_status(IE_IRQ5); local_flush_tlb_all(); From patchwork Sat Oct 9 02:20:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00A8BC4332F for ; Sat, 9 Oct 2021 02:20:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DFB53610E7 for ; Sat, 9 Oct 2021 02:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244343AbhJICWc (ORCPT ); Fri, 8 Oct 2021 22:22:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244245AbhJICW2 (ORCPT ); Fri, 8 Oct 2021 22:22:28 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 859BEC061762; Fri, 8 Oct 2021 19:20:32 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id oa6-20020a17090b1bc600b0019ffc4b9c51so10542117pjb.2; Fri, 08 Oct 2021 19:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=knXL02VOmkFLU9YLWF/5g5SfaxjLRPWcMFGGkfQ2MJo=; b=PMSUeeAYM+oSOKVpdeZKASGuomG/1VnuqZk/Uq6pcXRsTS+Ue+dL7ctnmO7CK4cyo+ uQEnzGeBaaKpmwDCTEhtv2mddWa3KWk2qvOcvE5ysHODe3eZ6fH5Z5Gl1Ic4OcEpBHFa lmi3ZYd1NXuS5I8nzIYe4ikN+QGK3JoE8T4KDkTGQ4Tmfdp5r3Kjz0h5ENzqMOXIQ8jB 3k4RpZ8vLi8FK+8yhQrdl2zJ4DdUTZjIRZkrwoFyKrMAyG+FkqXkN/VT/z/oP6H82ag/ mGJEdxxE56MvHnr5fX5ZrgbdcyKX3LKtrpHDxkj//f5OUKjzTXFHv1uX/mF9fSejdcKQ i26g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=knXL02VOmkFLU9YLWF/5g5SfaxjLRPWcMFGGkfQ2MJo=; b=dM4wYnnMd01u64EgaNQxtM0PhHmFoGlqeNRyghv3XCuX7T/AORYiGOvs/WySi1wQ8X bH7LHiDAoIPRQfY2POwdOw4xDT1x3I9B8WyeHZDHLrH97mMz2oZRuQvqlbatdWYvCq2o ViFrgoTbkvm2z5lRfPkjvL39b/gqF9+ewVGTf/mHX6wk8z6KppWyt+kLNeF0Yqn0gCad fv1zQ6yOVIrLExqTEIyNEm+548OmYoRbLvs6JvIHYSsP7JCZ8dHhqRLIj29FBJ4GAb8J Nwr1D0U+OsiB810n76PD4Sc+eoMM0EargdDcYU80jyBo3BtfTOZuvh+YkbSlAdHX9vqi KjkQ== X-Gm-Message-State: AOAM533c7lnfFjFkv3B563zlVH+a5mUlO78LkIxnRoyMaq+aTDnC/I1u TUE6XtKajsd3vVo+zt9utmsBoIcrHTs= X-Google-Smtp-Source: ABdhPJzg2OrVUx8X7+f5WBVJ9F/oWRwsNiIZF7TwFPVn4Cq0sLkiujyN2p8LDToBroMMnAdUY/oE0A== X-Received: by 2002:a17:90a:7d11:: with SMTP id g17mr15405247pjl.19.1633746031721; Fri, 08 Oct 2021 19:20:31 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:31 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 02/14] irqchip/irq-bcm7038-l1: Remove .irq_cpu_offline() Date: Fri, 8 Oct 2021 19:20:11 -0700 Message-Id: <20211009022023.3796472-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org With arch/mips/kernel/smp-bmips.c having been migrated away from irq_cpu_offline() and use irq_migrate_all_off_this_cpu() instead, we no longer need to implement an .irq_cpu_offline() callback. This is a necessary change to facilitate the building of this driver as a module. Signed-off-by: Florian Fainelli --- drivers/irqchip/irq-bcm7038-l1.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c index a035c385ca7a..750156217c82 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -221,33 +221,6 @@ static int bcm7038_l1_set_affinity(struct irq_data *d, return 0; } -#ifdef CONFIG_SMP -static void bcm7038_l1_cpu_offline(struct irq_data *d) -{ - struct cpumask *mask = irq_data_get_affinity_mask(d); - int cpu = smp_processor_id(); - cpumask_t new_affinity; - - /* This CPU was not on the affinity mask */ - if (!cpumask_test_cpu(cpu, mask)) - return; - - if (cpumask_weight(mask) > 1) { - /* - * Multiple CPU affinity, remove this CPU from the affinity - * mask - */ - cpumask_copy(&new_affinity, mask); - cpumask_clear_cpu(cpu, &new_affinity); - } else { - /* Only CPU, put on the lowest online CPU */ - cpumask_clear(&new_affinity); - cpumask_set_cpu(cpumask_first(cpu_online_mask), &new_affinity); - } - irq_set_affinity_locked(d, &new_affinity, false); -} -#endif - static int __init bcm7038_l1_init_one(struct device_node *dn, unsigned int idx, struct bcm7038_l1_chip *intc) @@ -396,9 +369,6 @@ static struct irq_chip bcm7038_l1_irq_chip = { .irq_mask = bcm7038_l1_mask, .irq_unmask = bcm7038_l1_unmask, .irq_set_affinity = bcm7038_l1_set_affinity, -#ifdef CONFIG_SMP - .irq_cpu_offline = bcm7038_l1_cpu_offline, -#endif #ifdef CONFIG_PM_SLEEP .irq_set_wake = bcm7038_l1_set_wake, #endif From patchwork Sat Oct 9 02:20:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D1ABC433FE for ; Sat, 9 Oct 2021 02:20:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E342D60F90 for ; Sat, 9 Oct 2021 02:20:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244473AbhJICWh (ORCPT ); Fri, 8 Oct 2021 22:22:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244336AbhJICWb (ORCPT ); Fri, 8 Oct 2021 22:22:31 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EF53C06176C; Fri, 8 Oct 2021 19:20:34 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id n11so6869184plf.4; Fri, 08 Oct 2021 19:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b+ZBi3anDomFQV4e/giygkqAUlU4kNEpUMbqtcbvyD0=; b=GKRgrW9QFKOioBZo1RI+VKpq5uf6LGwK5q2jelZH/Z4LPF+xgZGOXxs+VqGU75R2mw weK4TN90FEmgYCwy+FrjrPTzqXgn0hPizTkv/FatD5UAQTuxvB8FTZIJRlsiyaht1kbC Gh0cEbcYbCQVluL6JW7zuZzLSeenNyRaBlKJVA4T48RZIsGf0Vzza11FXZ3mDfttKj5a YukxssY7uYec/Z9/Nb7S+uPhzw8i9B3549I3bal2AuTmL3vbku/RhSHownMTh5ewCRkt EyKfDAW+vlNqwxK2k1hZaQRhAjcqE/j7o3DvFevoW1jTk7DVxFSB94ANqQy0bLz0aTkf GN3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b+ZBi3anDomFQV4e/giygkqAUlU4kNEpUMbqtcbvyD0=; b=FOs3UmwaH2FLyaEe9/wlXUEDgd+lB/gVekzh4/S2Tt+g593To9qfXUheOqwBX1P0RV AvwlspowN1l/B7LHJIiSABqmSa2/jWoLRJSHf1+PGGXrgDzZPJCjusbV/wq4A77gVyrx 70LDnZeNmjbrqjEIErGE3rcqDwhcCFH4ugJ8g4X0vlc0m+RpWR3zQ1NzdgSzFsNze6nf HLYT436vI40Ds+R+lS+f0ofbSNCG7CVh1M3PfmIl+U4ZeYKBGrfWiMKXyqnH5ZBIdS/f FfZ5X6jUlZ+oi/JntSAUswUGUmngOHKtj9tUPhKQ0hx4EK+O2BXI7Qg1Sh4YlQUYoOqq CTLQ== X-Gm-Message-State: AOAM531rXsg3iGz3YbpLvo5sAvD8aDFDkKLvb8V+d6FRkwVUsLQlOMeC 3yuVBcq/1vqYpMHfpDC3pX0i1pEmlM8= X-Google-Smtp-Source: ABdhPJyEJoQPpWTVdtBiJLwZn89ZXiyoahAuHDNGpbSqabP7fCIHLAdNqD7QVHIdSxf9qwDLs0VGYQ== X-Received: by 2002:a17:90a:a585:: with SMTP id b5mr16001989pjq.97.1633746033454; Fri, 08 Oct 2021 19:20:33 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:32 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 03/14] irqchip/irq-bcm7038-l1: Use irq_get_irq_data() Date: Fri, 8 Oct 2021 19:20:12 -0700 Message-Id: <20211009022023.3796472-4-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Using irq_desc_get_irq_data(irq_to_desc()) to retrieve the irq_data structure from a virtual interrupt number is going to be problematic to make irq-bcm7038-l1 a module because irq_to_desc() is not exported, and there is no intent to export it to modules, see 64a1b95bb9fe ("genirq: Restrict export of irq_to_desc()"). Signed-off-by: Florian Fainelli --- drivers/irqchip/irq-bcm7038-l1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c index 750156217c82..14caf32dc23e 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -386,7 +386,7 @@ static int bcm7038_l1_map(struct irq_domain *d, unsigned int virq, irq_set_chip_and_handler(virq, &bcm7038_l1_irq_chip, handle_level_irq); irq_set_chip_data(virq, d->host_data); - irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq))); + irqd_set_single_target(irq_get_irq_data(virq)); return 0; } From patchwork Sat Oct 9 02:20:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C4FAC433F5 for ; Sat, 9 Oct 2021 02:20:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8846161038 for ; Sat, 9 Oct 2021 02:20:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244435AbhJICWk (ORCPT ); Fri, 8 Oct 2021 22:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244245AbhJICWf (ORCPT ); Fri, 8 Oct 2021 22:22:35 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2033C061570; Fri, 8 Oct 2021 19:20:35 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id v20so189574plo.7; Fri, 08 Oct 2021 19:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G1RiT4GRKPcXSkOjyrks/jOWZL3DTQpMJtRhCsgVjY8=; b=bJ9KuSL5TgeWyqKaNO+GyL79xvaPjqlHFkgNvb4kUgxAmLsjpp8VRQ+Gx7VrYcypLZ abv3tPhR4NhdT1ba5/pktaJs0V2aQ0bulDU+3q7PxtU0kLZbKHktoBROaTbyBPqU56Ob 2KDuqvy30PtmXSomEAvNea3kdOxaoNSBnz3/JgNyxLRqBLvP45gpHGDPaL3+suQaP92s d1MlnJUTc5eAEd4YjTFmAu8icn5KR72wyfbVCe7FqXlqsz1h5uNZ1ltr06TL5JqShMqu AerdQraWSF2a+EwBXrgumcUlnzD9Mr4vtYumZkHIu79I4Ja4vwvjCyK27QonQzMqUe0N gyGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G1RiT4GRKPcXSkOjyrks/jOWZL3DTQpMJtRhCsgVjY8=; b=Wr4ApFEAmvIokvAWdVRHoQ+HEF8068BP4FRlyAZbuf4u/Vut7nvbhKbcpi1zi1Nqkv X5PWVDCjT26LJ4bKzgtyfZ7uE9kSUygRZVaqNmrvWDTCapKgM0EPFyw+8Vzo4XyeM+KP /jg0ueF8MsinMFMxLQNzzv8a9bfNA5ggVgy17aFeWtMk+D1mO6K95uVuYAw6CC/mSh48 jJVAxeiJHf5g+jLqOhrGbmGcZZsV/2JiTWWFnEuqSXo7UXgcfnvUtZR8+1GBK9sHjw+E TIAqH82FQNRoShP6s64mQDMNEIJ2mnLqc8pg+WC+AE7/BghIintsjbkAynoBtb+5MxDT pKsQ== X-Gm-Message-State: AOAM5326gXOUFrqC9bXu8BLY0wjNxltZFVHCHmpbpNEfYMIHsMYWjeSP 9TVX92So/hfbEDYbzppB23xGuHdtans= X-Google-Smtp-Source: ABdhPJzt3cUT0qN+Y44kkLg1/73jsgwdfZQ+cXkdb/8YqpQ6audqUIfOzS1omAW67biNzXtaW92lFA== X-Received: by 2002:a17:90b:390d:: with SMTP id ob13mr15368899pjb.49.1633746035050; Fri, 08 Oct 2021 19:20:35 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:34 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 04/14] irqchip/irq-bcm7038-l1: Gate use of CPU logical map to MIPS Date: Fri, 8 Oct 2021 19:20:13 -0700 Message-Id: <20211009022023.3796472-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org The use of the cpu_logical_map[] array is only relevant for MIPS based platform where this driver is used as a first level interrupt controller and contains multiple register groups to map with an associated CPU. On ARM/ARM64 based systems this interrupt controller is present and used as a second level interrupt controller hanging off the ARM GIC. That copy of the interrupt controller contains a single group, resulting in the intc->cpus[] array to be of size 1. Things happened to work in that case because we install that interrupt controller as a chained handler which does not allow it to be affine to any CPU but the boot CPU which happens to be 0, therefore we never de-reference past intc->cpus[] but with the current code in place, we do leave a chance of de-referencing the array past its bounds. Signed-off-by: Florian Fainelli --- drivers/irqchip/irq-bcm7038-l1.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c index 14caf32dc23e..3c4e348c661e 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -28,9 +28,6 @@ #include #include #include -#ifdef CONFIG_ARM -#include -#endif #define IRQS_PER_WORD 32 #define REG_BYTES_PER_IRQ_WORD (sizeof(u32) * 4) @@ -127,7 +124,7 @@ static void bcm7038_l1_irq_handle(struct irq_desc *desc) struct irq_chip *chip = irq_desc_get_chip(desc); unsigned int idx; -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && defined(CONFIG_MIPS) cpu = intc->cpus[cpu_logical_map(smp_processor_id())]; #else cpu = intc->cpus[0]; @@ -301,7 +298,7 @@ static int bcm7038_l1_suspend(void) u32 val; /* Wakeup interrupt should only come from the boot cpu */ -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && defined(CONFIG_MIPS) boot_cpu = cpu_logical_map(0); #else boot_cpu = 0; @@ -325,7 +322,7 @@ static void bcm7038_l1_resume(void) struct bcm7038_l1_chip *intc; int boot_cpu, word; -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && defined(CONFIG_MIPS) boot_cpu = cpu_logical_map(0); #else boot_cpu = 0; From patchwork Sat Oct 9 02:20:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EFFEC433EF for ; Sat, 9 Oct 2021 02:20:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BC2A61108 for ; Sat, 9 Oct 2021 02:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244414AbhJICWj (ORCPT ); Fri, 8 Oct 2021 22:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244418AbhJICWg (ORCPT ); Fri, 8 Oct 2021 22:22:36 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8331C061762; Fri, 8 Oct 2021 19:20:37 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id x4so7304939pln.5; Fri, 08 Oct 2021 19:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eUj8nxm+KdP0d5VfXzrEXZEp4lkprKHXeVwPIifh+Cg=; b=c3kSTNU5BJ5QJ8JFiLbKzy/A99Z9toAXdm8flW49HTdq+mK8b6A7ui+km1TYuw8W+N 5+vQc53uz6VTLSSGmQd3YezfNXwoErRNKVSe0OKKkNje2y9rvVwCQHfRFqiejMI91MWY 1ntrMG6PNrlUvm6tyTuQIPpftoTaATluQibOUCeOfx9gLuSQ7+lzSWvEaJFxHcpgYO5h We7BGG2kamEbC2Cg+uMSjwJoSd/CgEqTvCjM0FB5Gj/lBa4MEP/WKQd/L5ZmjLJt4/0t bh2DjPtu8X0s+rEjCTZcKOagnohQmQ6OSCa1fqKmZ0+QwBJE369PCCeoHqNlkl+comGp FEpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eUj8nxm+KdP0d5VfXzrEXZEp4lkprKHXeVwPIifh+Cg=; b=EWiO+y9v1eb1YWErlDP0ib2/IWwrSTBW3s6OqWOf/2p1VRgm0xFkiwhYK8XtAntEoA pZD/6syS+uSPfrBMayhfP6vze4bwioNfJBFV2t/aVkphm8QjbiQFHze3wn2xp9CIj9BL izXZQGz8B2xvC6V+WBX8HIoxjSZq6YrnavkYJjUl1XFWetU2WRPRNBZpW3l7AZh2Kb2U Lw07BdfNxw0rI7DSdHZng5PB+PA2OXbQkHopIbWr/0LVsbiALRFMHvB/5G+tSV75eQ6P l7pmnfC+ZAtBhV9GoGPIcB4jfWiYL25d9pH4IsTfDxTXcJ3BAhf4W7b2lup9SmjsIExa aHxw== X-Gm-Message-State: AOAM533vjqbe2S+jhXkJttPy2iJVaIQrctvYocWO2xAVSIEHEeceo4rw RtJz5lZwhl51vthY8Mo5SlX1HZkxdoY= X-Google-Smtp-Source: ABdhPJylbltqq722kc9cPzBDT4GPP7LV4CG7AB61SJI6JZWdbUgJzjWWOuuGBYhxg/9m938uUnCb/Q== X-Received: by 2002:a17:902:f691:b0:13f:2034:7613 with SMTP id l17-20020a170902f69100b0013f20347613mr2540590plg.81.1633746036946; Fri, 08 Oct 2021 19:20:36 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:36 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 05/14] irqchip/irq-bcm7038-l1: Restrict affinity setting to MIPS Date: Fri, 8 Oct 2021 19:20:14 -0700 Message-Id: <20211009022023.3796472-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Only MIPS based platforms using this interrupt controller as first level interrupt controller can actually change the affinity of interrupts by re-programming the affinity mask of the interrupt controller and use another word group to have another CPU process the interrupt. When this interrupt is used as a second level interrupt controller on ARM/ARM64 there is no way to change the interrupt affinity. This fixes a NULL pointer de-reference while trying to change the affinity since there is only a single word group in that case, and we would have been overruning the intc->cpus[] array. Signed-off-by: Florian Fainelli --- drivers/irqchip/irq-bcm7038-l1.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c index 3c4e348c661e..357570dd8780 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -191,6 +191,7 @@ static void bcm7038_l1_mask(struct irq_data *d) raw_spin_unlock_irqrestore(&intc->lock, flags); } +#if defined(CONFIG_MIPS) && defined(CONFIG_SMP) static int bcm7038_l1_set_affinity(struct irq_data *d, const struct cpumask *dest, bool force) @@ -217,6 +218,7 @@ static int bcm7038_l1_set_affinity(struct irq_data *d, return 0; } +#endif static int __init bcm7038_l1_init_one(struct device_node *dn, unsigned int idx, @@ -365,7 +367,9 @@ static struct irq_chip bcm7038_l1_irq_chip = { .name = "bcm7038-l1", .irq_mask = bcm7038_l1_mask, .irq_unmask = bcm7038_l1_unmask, +#if defined(CONFIG_SMP) && defined(CONFIG_MIPS) .irq_set_affinity = bcm7038_l1_set_affinity, +#endif #ifdef CONFIG_PM_SLEEP .irq_set_wake = bcm7038_l1_set_wake, #endif From patchwork Sat Oct 9 02:20:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2ADB2C43217 for ; Sat, 9 Oct 2021 02:20:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16E61610E7 for ; Sat, 9 Oct 2021 02:20:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244418AbhJICWl (ORCPT ); Fri, 8 Oct 2021 22:22:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244455AbhJICWg (ORCPT ); Fri, 8 Oct 2021 22:22:36 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5754EC061774; Fri, 8 Oct 2021 19:20:39 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id pi19-20020a17090b1e5300b0019fdd3557d3so9090698pjb.5; Fri, 08 Oct 2021 19:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IqTvFkxEB42F4FY7x5fTTUp3BY0gcheCImqFREsoxYU=; b=k0+o3REhJGZc03nzXzkRd9Oio+6a3BR7RuZnftlFNI6R3hc4lz/gKSB3aByCVzQ80n TKD8iHe7A8CRJHpTYEQtbXKKHFfSY/Jj7d6EhKesZAoiFgGQE+oMekunYBq0PaSRfKmZ NBt7Q1k+5ZbrIaJPhCARgjiLPcy+i2jIAH49h6z/zml6Afq7fQtEoFT+xzcxD4YrqdjG 9+pROqJT03lnLivwp6BfFiS3fnZI11xAwVJ8Z2LkUGnC3Q/OPSUYIoY5E68EXLgPlVl0 NpDvmj/XBJKUBTXAKusu+ZbXMP71NeHvf5Z3sZ8YpHcwuLxpvn1KKSVwT7TanuScHgWq gxHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IqTvFkxEB42F4FY7x5fTTUp3BY0gcheCImqFREsoxYU=; b=S2CqGJti+pWuO4vBQe61KP1+bXJ0NIMYLL5lFFlwCl8A66e1Uo15U7lTotPVRle8pO TDdi2S6Wv+aKASUgTb+7ZEqLEOzLOiB382WuTx719v48Ko8zraDZGpk97TCjkyC+lDAY E3GW7cufYzYck//D8JHbJRhNULLOaSx/AxyGm/wyPP8hD3nHujBM66/l2I3WaUT8OpRk I8AetgcV+dE2r31EQn4Lm5MpseRtASj2+MwZkcG8vI8BEaOFFSfI1ZqEAGZ9A3sLwaHM KrQdoM2iU/3vcBAIUW9PaDOi/Uf+leyDcd6oqH/ZJVIVqmFRdnlQR5O0tB3LrR+4FULH 5vUQ== X-Gm-Message-State: AOAM5300+sh97YQtxL6q0HHcedRwtX6JKEYvAQYRfwi4kQcCzsdw/pKm ZEH/1V8Q+KWRECUYqDpyNsceUAJ8iHo= X-Google-Smtp-Source: ABdhPJzf9Q1oZfg5pPn97RR5PTRl6yYlUHYfjjRwh0BfIT2/Gwm/ScNxwnrnOSDAYZ337GekmMQA4w== X-Received: by 2002:a17:902:6b0b:b0:13a:18bf:1ece with SMTP id o11-20020a1709026b0b00b0013a18bf1ecemr12351269plk.49.1633746038565; Fri, 08 Oct 2021 19:20:38 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:38 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 06/14] irqchip/irq-bcm7038-l1: Switch to IRQCHIP_PLATFORM_DRIVER Date: Fri, 8 Oct 2021 19:20:15 -0700 Message-Id: <20211009022023.3796472-7-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Allow the user selection and building of this interrupt controller driver as a module since it is used on ARM/ARM64 based systems as a second level interrupt controller hanging off the ARM GIC and is therefore loadable during boot. Signed-off-by: Florian Fainelli --- drivers/irqchip/Kconfig | 4 +++- drivers/irqchip/irq-bcm7038-l1.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 4d5924e9f766..3022f6137096 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -115,7 +115,9 @@ config BCM6345_L1_IRQ select GENERIC_IRQ_EFFECTIVE_AFF_MASK config BCM7038_L1_IRQ - bool + tristate "Broadcom STB 7038-style L1/L2 interrupt controller driver" + depends on ARCH_BRCMSTB || BMIPS_GENERIC + default ARCH_BRCMSTB || BMIPS_GENERIC select GENERIC_IRQ_CHIP select IRQ_DOMAIN select GENERIC_IRQ_EFFECTIVE_AFF_MASK diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c index 357570dd8780..a62b96237b82 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -455,4 +455,8 @@ static int __init bcm7038_l1_of_init(struct device_node *dn, return ret; } -IRQCHIP_DECLARE(bcm7038_l1, "brcm,bcm7038-l1-intc", bcm7038_l1_of_init); +IRQCHIP_PLATFORM_DRIVER_BEGIN(bcm7038_l1) +IRQCHIP_MATCH("brcm,bcm7038-l1-intc", bcm7038_l1_of_init) +IRQCHIP_PLATFORM_DRIVER_END(bcm7038_l1) +MODULE_DESCRIPTION("Broadcom STB 7038-style L1/L2 interrupt controller"); +MODULE_LICENSE("GPL v2"); From patchwork Sat Oct 9 02:20:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACC4CC433F5 for ; Sat, 9 Oct 2021 02:20:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9660D61027 for ; Sat, 9 Oct 2021 02:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244463AbhJICWy (ORCPT ); Fri, 8 Oct 2021 22:22:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244357AbhJICWi (ORCPT ); Fri, 8 Oct 2021 22:22:38 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D3B6C061768; Fri, 8 Oct 2021 19:20:41 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id pi19-20020a17090b1e5300b0019fdd3557d3so9090733pjb.5; Fri, 08 Oct 2021 19:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cLaNe7Oyl1seZD/HRHq9xGsMnTdlxwayLK+zY+0ZWyA=; b=gLZsVmimLpwdtSBi4C9L0jfoIeRjzgLq1tNByCwcf/Pgmt8XK6gt3GE25RbSb+aujd 1RAq+b0Cw56Hdb1CUCjtznchKAhDAGNN03iTmuRHXbhl0D1+RdUSFuFSyGXYg7DE+yJi Y5fkROAfSMIrAQW5gNYVpmMUoSanPPLDit+e/S/uJb8Zzp6TfxlDVPokMfEdT0RhOZ7y VhjTy2oTMuYqM+CDyQJDhw7r6RoKw+CQ1wnOo5B97k/91L2kgIfMN0H6iNQSv2qCGLqj G5x5eVnUNOEe/g+WWD+mYhM++op2NIVQd57wlQxOIFafjFFZhLD1cO/ocjfibA2RvSat PWbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cLaNe7Oyl1seZD/HRHq9xGsMnTdlxwayLK+zY+0ZWyA=; b=EwTwilFznAN0vc9vqT/nKx2Ey8/rItYwMBYtLRWfxLvq1BrJwZk75hLiFk/AjKRg9R NMy8eNTnYQT4g1wpK02U6p7IY9QieShyUhg32OO7e2GHv7Kby6dZezpLdWBKRZzx3mXi oivAyyFuyYV8vcUwCY7nhVTDfssy00sIv4Bi/8v0v6XeNyJKBTyasTY+tpFVA8l/5skz No+0aP06DLfPtESsp0HzYRWD17fwozMTRoyp+igfAGJfEtXllW99ylIqxvcXYwB8hqpD 99jwJQtgxgzPCD86b6U3VhcShCfGTCTJ13bmPQl422zEk9ZmRD2PJ+W/fS0PATJLHIsJ iWBg== X-Gm-Message-State: AOAM530RXfLh8eYI3y9H5fIBTy2Dh6Yw+z5b1c//Q0JUXrHTnVj2fk9G yfxKG3I947oQ1KchDIy9rkNFvtVVBY8= X-Google-Smtp-Source: ABdhPJz9L3vfDpAsutWUnZSpQUlLafnW1o2LTEFqy0TfbDnkzKBU2FxszoAr1cMPr3hzm1B9TszXCQ== X-Received: by 2002:a17:903:1ca:b0:13e:f367:9361 with SMTP id e10-20020a17090301ca00b0013ef3679361mr12635742plh.3.1633746040278; Fri, 08 Oct 2021 19:20:40 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:39 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 07/14] genirq: Export irq_gc_{unmask_enable,mask_disable}_reg Date: Fri, 8 Oct 2021 19:20:16 -0700 Message-Id: <20211009022023.3796472-8-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org In order to allow drivers/irqchip/irq-brcmstb-l2.c to be built as a module we need to export: irq_gc_unmask_enable_reg() and irq_gc_mask_disable_reg(). Signed-off-by: Florian Fainelli --- kernel/irq/generic-chip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c index cc7cdd26e23e..4c011c21bb1a 100644 --- a/kernel/irq/generic-chip.c +++ b/kernel/irq/generic-chip.c @@ -44,6 +44,7 @@ void irq_gc_mask_disable_reg(struct irq_data *d) *ct->mask_cache &= ~mask; irq_gc_unlock(gc); } +EXPORT_SYMBOL_GPL(irq_gc_mask_disable_reg); /** * irq_gc_mask_set_bit - Mask chip via setting bit in mask register @@ -103,6 +104,7 @@ void irq_gc_unmask_enable_reg(struct irq_data *d) *ct->mask_cache |= mask; irq_gc_unlock(gc); } +EXPORT_SYMBOL_GPL(irq_gc_unmask_enable_reg); /** * irq_gc_ack_set_bit - Ack pending interrupt via setting bit From patchwork Sat Oct 9 02:20:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E93BFC433FE for ; Sat, 9 Oct 2021 02:21:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D360F60FD7 for ; Sat, 9 Oct 2021 02:21:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244690AbhJICWz (ORCPT ); Fri, 8 Oct 2021 22:22:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244509AbhJICWi (ORCPT ); Fri, 8 Oct 2021 22:22:38 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9016C061755; Fri, 8 Oct 2021 19:20:42 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id v11so4797996pgb.8; Fri, 08 Oct 2021 19:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9fJWAIDZMBnqyaJKloz+swm+vHzzjwQ8q/tXjCn73F0=; b=SzJB32ERexKcnc4C4x9hDpIfy0O4VItzue50HM4cKKD5Gadnyhf8uXegzSTrezL3Z7 XowA8CHweVmv5m4Lpu733cs506OqQyJSJzoKvxwelE2U4MrGUPeeOdOohNLpBqxWvUNj 90DHq8ceh0Uf2xf75KOWmPj4v7vt99MSjLsaKeaZncTaVLBrjAEfCYGCjegNC1IgcFto HyFUYoN/UJ8oJ61ToBbsmg48ayMjbmkcbS7RcREaRMKZM5lb6us/cTw8AxtcqAfVE2kl oWGa8fNcIrx4+Q0TBt055dUHyTX+CaRPufbLStJBcNF/jesBGKJBeY/Wl0ac/23bTkwU XwTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9fJWAIDZMBnqyaJKloz+swm+vHzzjwQ8q/tXjCn73F0=; b=TNNlxT/Rf2stpDTzhPMHWcxSJ9zji/Ef9J6RzrcQ94UHWR8GlTXlKwgdUfzM/P6NIb MiDjcV8uFVM4OdvbSvsnRwoNeRaprv5q/eSzTv36maOXHZB2tj5/DdkBSZvvF1L9FdvC qzwYf50YzTqusPFVSjtvQNqV6XPsPvvuxPg0+77em62pnWP/fuKl2lo4JAvEMvzxq88o msuur4ZEc6ON9Wxi1xPcSkxqzzHbPlRXLjO0+Apb2TaWK55KvgRX8yJNcQj0C3hR8nsZ xXMVGAhfffyNCyxZT3dKD8xO2C506sLERQuj9AxSVxPGzDj981d5P1gB506ufEJz3HVU cDZg== X-Gm-Message-State: AOAM5317SompDC6ax2BY1PdknrAJUKgJE53bIU/9I6t6aFVQ9aIqmAbZ +xiGv3pE3f7rayti0mRzLOdnP1W0+ac= X-Google-Smtp-Source: ABdhPJzXy+7f0es9EghURGg8TvHh1mVwIe6bucOdCVqh1OIUwlGNbp2R3VsYxzh1zfze0kMlkdhPIA== X-Received: by 2002:a63:ed4f:: with SMTP id m15mr7567625pgk.471.1633746041911; Fri, 08 Oct 2021 19:20:41 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:41 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 08/14] irqchip/irq-brcmstb-l2: Switch to IRQCHIP_PLATFORM_DRIVER Date: Fri, 8 Oct 2021 19:20:17 -0700 Message-Id: <20211009022023.3796472-9-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Allow the user selection and building of this interrupt controller driver as a module since it is used on ARM/ARM64 based systems as a second level interrupt controller hanging off the ARM GIC and is therefore loadable during boot. Signed-off-by: Florian Fainelli --- drivers/irqchip/Kconfig | 4 +++- drivers/irqchip/irq-brcmstb-l2.c | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 3022f6137096..dfe54bf9b35f 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -128,7 +128,9 @@ config BCM7120_L2_IRQ select IRQ_DOMAIN config BRCMSTB_L2_IRQ - bool + tristate "Broadcom STB generic L2 interrupt controller driver" + depends on ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC + default ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC select GENERIC_IRQ_CHIP select IRQ_DOMAIN diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb-l2.c index 8e0911561f2d..e4efc08ac594 100644 --- a/drivers/irqchip/irq-brcmstb-l2.c +++ b/drivers/irqchip/irq-brcmstb-l2.c @@ -275,16 +275,18 @@ static int __init brcmstb_l2_edge_intc_of_init(struct device_node *np, { return brcmstb_l2_intc_of_init(np, parent, &l2_edge_intc_init); } -IRQCHIP_DECLARE(brcmstb_l2_intc, "brcm,l2-intc", brcmstb_l2_edge_intc_of_init); -IRQCHIP_DECLARE(brcmstb_hif_spi_l2_intc, "brcm,hif-spi-l2-intc", - brcmstb_l2_edge_intc_of_init); -IRQCHIP_DECLARE(brcmstb_upg_aux_aon_l2_intc, "brcm,upg-aux-aon-l2-intc", - brcmstb_l2_edge_intc_of_init); static int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np, struct device_node *parent) { return brcmstb_l2_intc_of_init(np, parent, &l2_lvl_intc_init); } -IRQCHIP_DECLARE(bcm7271_l2_intc, "brcm,bcm7271-l2-intc", - brcmstb_l2_lvl_intc_of_init); + +IRQCHIP_PLATFORM_DRIVER_BEGIN(brcmstb_l2) +IRQCHIP_MATCH("brcm,l2-intc", brcmstb_l2_edge_intc_of_init) +IRQCHIP_MATCH("brcm,hif-spi-l2-intc", brcmstb_l2_edge_intc_of_init) +IRQCHIP_MATCH("brcm,upg-aux-aon-l2-intc", brcmstb_l2_edge_intc_of_init) +IRQCHIP_MATCH("brcm,bcm7271-l2-intc", brcmstb_l2_lvl_intc_of_init) +IRQCHIP_PLATFORM_DRIVER_END(brcmstb_l2) +MODULE_DESCRIPTION("Broadcom STB generic L2 interrupt controller"); +MODULE_LICENSE("GPL v2"); From patchwork Sat Oct 9 02:20:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58E75C433EF for ; Sat, 9 Oct 2021 02:21:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4430660F90 for ; Sat, 9 Oct 2021 02:21:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244419AbhJICW6 (ORCPT ); Fri, 8 Oct 2021 22:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244562AbhJICWk (ORCPT ); Fri, 8 Oct 2021 22:22:40 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57D98C061771; Fri, 8 Oct 2021 19:20:44 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id v20so189676plo.7; Fri, 08 Oct 2021 19:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dv8ie/kzP99OSKx2zPfoLqRlI0izEadzKVnoX+2n0Ow=; b=XmVZQ8ecVe8ssNoW3ri/l0xaim8HSgzUF8wAV4y3HLNJpdveIMz6JlwIUVyEiWgj4R vr5X0u6sk9Ca5Pdw8C2ckmHkm7tibgMWWAyshNNen99epCOx6IOsEbbTa8+mOPrxucl3 F4YxOKSlw0G1DTsjnFtxO3exNW2jwZcpe8otVI6WAtvF75bryFrdxpZSI6lhiuL/aYzT ZnQbqJOogyH8DTx4Yg2JW0vqrn+jkoV+YPOnUcLEteYbAJAaIyahNwX/ZTGs14GLPE2p I0t73KD1eIZAGOLNopwuBzjzneID8YRilac4sz4oe9MNBQ8AA/ljepB4ytxjTREo432T JoiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dv8ie/kzP99OSKx2zPfoLqRlI0izEadzKVnoX+2n0Ow=; b=L+AB0CVZ4upXjPARARI7TrAow2PfsVolwagDGAyoS4SbhCAeEM/szWWHwrHvvXpsA4 p5SMmd2/QjVdEo0h73aUYc0LoiWwltnbbObWhD+4NlW1tLmve0dDy1j5RdDerI2HJS9m 4ZBnG7w64sgk0EItMerfc4IDdhSM3mJQvK1OoIaheu/u1WzfLyfpEF8FjUM5UEWj06Dv FhF8vKJ0J3pHDgIgG94F8Fd+edRwbgirrqUIi8ev917NUqYRY05BeRqS96517PqnucOF rBUKtFaEqYPj2Fi0rg/OzX2msusaJCdjdpFZ5a0UK4foofQ/RL0qB10FlLoHYgla6baI uU1Q== X-Gm-Message-State: AOAM5309pTwfXq/5wkGL+LAaTEjkpguA2Gmclfj42TPmJ79xYq3zaYeU 7uBiA/h9gpUlWwuzpRYwnSpcKYXZ26E= X-Google-Smtp-Source: ABdhPJzF3gI7qfa3LWqIKHoJ03LLsWPTSCV4u1fVS3qzFGwkcYas6/EtejS42d9w4UMRoGhUfYAlzw== X-Received: by 2002:a17:90b:1d0d:: with SMTP id on13mr15716331pjb.118.1633746043559; Fri, 08 Oct 2021 19:20:43 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:43 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Rob Herring , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 09/14] irqchip: Provide platform_device to of_irq_init_cb_t Date: Fri, 8 Oct 2021 19:20:18 -0700 Message-Id: <20211009022023.3796472-10-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Provide the platform device mapping to the interrupt controller node to the of_irq_init_cb_t callback such that drivers can make use of it. Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli --- drivers/irqchip/irqchip.c | 2 +- drivers/irqchip/qcom-pdc.c | 3 ++- drivers/of/irq.c | 2 +- include/linux/of_irq.h | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c index 3570f0a588c4..289784eefd00 100644 --- a/drivers/irqchip/irqchip.c +++ b/drivers/irqchip/irqchip.c @@ -55,6 +55,6 @@ int platform_irqchip_probe(struct platform_device *pdev) if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY)) return -EPROBE_DEFER; - return irq_init_cb(np, par_np); + return irq_init_cb(np, par_np, pdev); } EXPORT_SYMBOL_GPL(platform_irqchip_probe); diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c index 173e6520e06e..819a93360b96 100644 --- a/drivers/irqchip/qcom-pdc.c +++ b/drivers/irqchip/qcom-pdc.c @@ -359,7 +359,8 @@ static int pdc_setup_pin_mapping(struct device_node *np) return 0; } -static int qcom_pdc_init(struct device_node *node, struct device_node *parent) +static int qcom_pdc_init(struct device_node *node, struct device_node *parent, + struct platform_device *pdev) { struct irq_domain *parent_domain, *pdc_domain, *pdc_gpio_domain; int ret; diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 352e14b007e7..18f3f5c00c87 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -538,7 +538,7 @@ void __init of_irq_init(const struct of_device_id *matches) desc->dev, desc->dev, desc->interrupt_parent); ret = desc->irq_init_cb(desc->dev, - desc->interrupt_parent); + desc->interrupt_parent, NULL); if (ret) { of_node_clear_flag(desc->dev, OF_POPULATED); kfree(desc); diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index aaf219bd0354..89acc8b089f0 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -9,7 +9,10 @@ #include #include -typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *); +struct platform_device; + +typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *, + struct platform_device *); /* * Workarounds only applied to 32bit powermac machines From patchwork Sat Oct 9 02:20:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547095 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC44CC433FE for ; Sat, 9 Oct 2021 02:21:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 988BD61038 for ; Sat, 9 Oct 2021 02:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232244AbhJICXD (ORCPT ); Fri, 8 Oct 2021 22:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244574AbhJICWm (ORCPT ); Fri, 8 Oct 2021 22:22:42 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1CC1C061772; Fri, 8 Oct 2021 19:20:45 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id i65so6670312pfe.12; Fri, 08 Oct 2021 19:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HFON70fhXDszaD5v9yYPo/8gY6ecjeQthvGng5DXIkI=; b=ausIkCFGPbENw4fedQTfZPBRbHku2qqNzrF2dJaGXzJy/KWRfzy1m5YE3L4MIOQ8Ly inkTJv1ZYWR6QHIu01MeDGWQvHn831m8ZoEiKPbZy8nzBXC0Z7ImNduozSOBX0WrWB+V d5bG0dSAoBkEQhlW8aEdkJOpw4+g3FKlTrP6ONLjtQd5/maQuirUVJgiIL81QktZFU1M XlYC2/ET4kZFIl6YO3vvRNJauJAWS/3VUwoRIl8QIUGOTQv/okMNZpxSUP+Nbe0Agl+M 4o+6gGnwiPxQc7M4KlIsIkGC218ChGodQZTCqSQdvjY2tLsSumL74wDaQyDC+D0xMJLv 5U7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HFON70fhXDszaD5v9yYPo/8gY6ecjeQthvGng5DXIkI=; b=g8pA/zVv7YP22F/p/bwIjIHcjlyXUpZweiZoRQrXLV9zFk+5oi0HcHj7XjEy+r0ZKj TwnMaBlMZTQdbgusWN3BG4cFrJoVijiUSRSxjTk8zGUDNCqcP3pjcEjK/EL/x4F4lzBY gWTVFdwaUsaNAvvcMyAivUJ0MYGn3+zkmaEmJ9cviFtAzGwp0Tlzvk40aDaXEEcA0pLP OPbCMVAfXhvriTjDULJmRteIKa9q6aMfqZJn2DPXchaBT+Sy8lHpAfQTgAZcIAE2CvdW CLl1JDHkkMQqsNGQKppXT+ZCUr6RbQ7AvgZuLLrcg28JdmYO/JreVRep/NgHtQLVnKV7 hILg== X-Gm-Message-State: AOAM532Wp9L2vgK3UJYgS4R/XS7vgAx8dwWO9TGiO3GbBlkpqG5pe4RU /ZCBYC8ZqhWRKoH68g0zj7SrXsuHz6k= X-Google-Smtp-Source: ABdhPJzvROA2sOizAdWSh8eS2axz46xfjaBZ2sui7arqkGPAV1Aqc0JHKkBn+v1NulMnuGscFyLqfg== X-Received: by 2002:a63:470b:: with SMTP id u11mr7494988pga.441.1633746045144; Fri, 08 Oct 2021 19:20:45 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:44 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 10/14] genirq: Export irq_gc_noop() Date: Fri, 8 Oct 2021 19:20:19 -0700 Message-Id: <20211009022023.3796472-11-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org In order to build drivers/irqchip/irq-bcm7120-l2.c as a module which references irq_gc_noop(), we need to export it towards modules. Signed-off-by: Florian Fainelli --- kernel/irq/generic-chip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c index 4c011c21bb1a..6f29bf4c8515 100644 --- a/kernel/irq/generic-chip.c +++ b/kernel/irq/generic-chip.c @@ -25,6 +25,7 @@ static DEFINE_RAW_SPINLOCK(gc_lock); void irq_gc_noop(struct irq_data *d) { } +EXPORT_SYMBOL_GPL(irq_gc_noop); /** * irq_gc_mask_disable_reg - Mask chip via disable register From patchwork Sat Oct 9 02:20:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B66FC4332F for ; Sat, 9 Oct 2021 02:22:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04B7160F90 for ; Sat, 9 Oct 2021 02:22:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244556AbhJICX7 (ORCPT ); Fri, 8 Oct 2021 22:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244701AbhJICW5 (ORCPT ); Fri, 8 Oct 2021 22:22:57 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE488C0613E7; Fri, 8 Oct 2021 19:20:47 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id m14so9619210pfc.9; Fri, 08 Oct 2021 19:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T+nuZjtMi8lifdnlhi4/+fNb2Wj4qKRZZKIw/UMDjOI=; b=PpcBimyin5Ej1RL/hbX3YfaP6uvHOyuQ2APIZRjh0TYg8b9xfHmJ8kfayiYH9Flg63 C8tARaCoaqfNSTDQZEJcIyIQaQ/dxi0ZJPrVb4VixDeZKZp4JZJXgHx/yfxlOFU/jQtC IjTZ1eWvfqla518XdNlLtUvwPz1JjOfECdUgQb/QePJ1fqRTnxkL4WcznbFZYj1EfteW 6pJgcbIPSD5PZGJ243SNzsWTiriLB11+XXHgQeABobg11Ln5ocON54nVzzMK1nLhVeJc orShxsK9PZH0LsGZHATZ9cZ0bBIrDcNf4LOkaaicBLD8jNxzTmZNxNnmDL/vp3FWirdp BEHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T+nuZjtMi8lifdnlhi4/+fNb2Wj4qKRZZKIw/UMDjOI=; b=TbQ9MjjyLWKEb6AWYzy1YdTFo5g2auKOW+eNdKJdse5NMUCHGYnrT+I8YkOz0WyO/r 5m95MrmvZ3JcdBiK/KH2w/mg8PwKjxiqOousYHM5GJaYmCPJbr20JqExXaDlMvtY25yJ IQNe/4YgQzqJme7n1PrW1roedDYQX/TPO/Q/c9n8hrFt56E5TSzxelkhYNrPy1+AdzUf EJxdVxWwUtLAqdZN6B0NimcdQIIYDZrlHM+nYShBs8/8UkjEajWsq5ujJATpeMS6J9D3 GS9loPEjigYoeFPfR/SfvOTAmBk1dfjbNVaUR7vRQ/rEEPMqMTm/0AwqVCS/S72gk/JK Bf8A== X-Gm-Message-State: AOAM532GAA3jQchg427w6wrv4Ayi2TnfdnS524lFH8uUkpCgAyEiTQCJ GhdooJsiEkM4KN0DL1E/Oespbnm0UNc= X-Google-Smtp-Source: ABdhPJzyNux7TjxdeK/+G14//P/gTbXH1+cv4k91jYMW0VDllt/pYAjrkv2fXLEl/cUoMu0W93Q0Tg== X-Received: by 2002:a63:4717:: with SMTP id u23mr7514059pga.359.1633746047052; Fri, 08 Oct 2021 19:20:47 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:46 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 11/14] irqchip/irq-bcm7120-l2: Switch to IRQCHIP_PLATFORM_DRIVER Date: Fri, 8 Oct 2021 19:20:20 -0700 Message-Id: <20211009022023.3796472-12-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Allow the user selection and building of this interrupt controller driver as a module since it is used on ARM/ARM64 based systems as a second level interrupt controller hanging off the ARM GIC and is therefore loadable during boot. To avoid using of_irq_count() which is not exported towards module, switch the driver to use the platform_device provided by the irqchip platform driver code and resolve the number of interrupts using platform_irq_count(). Signed-off-by: Florian Fainelli --- drivers/irqchip/Kconfig | 4 +++- drivers/irqchip/irq-bcm7120-l2.c | 28 ++++++++++++++++------------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index dfe54bf9b35f..c7320bed5668 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -123,7 +123,9 @@ config BCM7038_L1_IRQ select GENERIC_IRQ_EFFECTIVE_AFF_MASK config BCM7120_L2_IRQ - bool + tristate "Broadcom STB 7120-style L2 interrupt controller driver" + depends on ARCH_BRCMSTB || BMIPS_GENERIC + default ARCH_BRCMSTB || BMIPS_GENERIC select GENERIC_IRQ_CHIP select IRQ_DOMAIN diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120-l2.c index f23d7651ea84..9b1edf7747fd 100644 --- a/drivers/irqchip/irq-bcm7120-l2.c +++ b/drivers/irqchip/irq-bcm7120-l2.c @@ -214,6 +214,7 @@ static int __init bcm7120_l2_intc_iomap_3380(struct device_node *dn, static int __init bcm7120_l2_intc_probe(struct device_node *dn, struct device_node *parent, + struct platform_device *pdev, int (*iomap_regs_fn)(struct device_node *, struct bcm7120_l2_intc_data *), const char *intc_name) @@ -230,7 +231,7 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn, if (!data) return -ENOMEM; - data->num_parent_irqs = of_irq_count(dn); + data->num_parent_irqs = platform_irq_count(pdev); if (data->num_parent_irqs <= 0) { pr_err("invalid number of parent interrupts\n"); ret = -ENOMEM; @@ -334,21 +335,24 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn, } static int __init bcm7120_l2_intc_probe_7120(struct device_node *dn, - struct device_node *parent) + struct device_node *parent, + struct platform_device *pdev) { - return bcm7120_l2_intc_probe(dn, parent, bcm7120_l2_intc_iomap_7120, - "BCM7120 L2"); + return bcm7120_l2_intc_probe(dn, parent, pdev, + bcm7120_l2_intc_iomap_7120, "BCM7120 L2"); } static int __init bcm7120_l2_intc_probe_3380(struct device_node *dn, - struct device_node *parent) + struct device_node *parent, + struct platform_device *pdev) { - return bcm7120_l2_intc_probe(dn, parent, bcm7120_l2_intc_iomap_3380, - "BCM3380 L2"); + return bcm7120_l2_intc_probe(dn, parent, pdev, + bcm7120_l2_intc_iomap_3380, "BCM3380 L2"); } -IRQCHIP_DECLARE(bcm7120_l2_intc, "brcm,bcm7120-l2-intc", - bcm7120_l2_intc_probe_7120); - -IRQCHIP_DECLARE(bcm3380_l2_intc, "brcm,bcm3380-l2-intc", - bcm7120_l2_intc_probe_3380); +IRQCHIP_PLATFORM_DRIVER_BEGIN(bcm7120_l2) +IRQCHIP_MATCH("brcm,bcm7120-l2-intc", bcm7120_l2_intc_probe_7120) +IRQCHIP_MATCH("brcm,bcm3380-l2-intc", bcm7120_l2_intc_probe_3380) +IRQCHIP_PLATFORM_DRIVER_END(bcm7120_l2) +MODULE_DESCRIPTION("Broadcom STB 7120-style L2 interrupt controller driver"); +MODULE_LICENSE("GPL v2"); From patchwork Sat Oct 9 02:20:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547099 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC251C433F5 for ; Sat, 9 Oct 2021 02:22:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A557660F21 for ; Sat, 9 Oct 2021 02:22:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244557AbhJICX7 (ORCPT ); Fri, 8 Oct 2021 22:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244640AbhJICXM (ORCPT ); Fri, 8 Oct 2021 22:23:12 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 649D3C0613EE; Fri, 8 Oct 2021 19:20:49 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id d13-20020a17090ad3cd00b0019e746f7bd4so10618761pjw.0; Fri, 08 Oct 2021 19:20:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5ALk99V/yV50Q7B1PyIb1+nfNEsL1ZZBgIrsEIIgD/g=; b=hwzgru1aZMAwfrvVGh2qdKu+NGHgUvHLDHdM3vQvgCU6/2UOJCtSZXDCaYHNkc7V4R QT0uCUn/oPzdmxKJ0a9QqIDSFtIq1ztTmQo61VZLUadSm8fgP8xS8Dp8s2JLkUAO4Cs8 3GTSxvgHBsyqzTAiGeqsPA7JpngNisT9lz2L6ST+U3bxN6blPYNbr6ggPt+iypJgcASx Xvayj6OzIYId5Geaq2cRJ2ZhrRMrkE7Twtkpf1VJMfDcqEbzmqkhb9qj3kNCJfVmmwqN n6miuCaYiJohks8Vgjus/az9ok3SvoIfn7V1gbLS+mmu75KgCYg7Satzf5blrxX22hfS pVJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5ALk99V/yV50Q7B1PyIb1+nfNEsL1ZZBgIrsEIIgD/g=; b=d1sy97NYrhTss3akoCt0dSsMK9RWMXC/iipqRJ5gpqmQPqvycA+zQEgRNwijfuCa30 UjbzoiGwBXyRicgBAE/LPWSjVV3gWdHGbw2JlBNk1CxLmCRQqrUnsQP/4BNqCQKspry2 MNNqUI4R9Ypt7jT/aIYpLrrp6uQ+cZPDekXsdL+ACn7zTO8qpsgxcaAxBWMevi5Cr/jg RISS8c0pExVbc1mprbndvVy/Z0JGc+VdxV8J3n8VrqP+JV8z/GzryExbB/zDa1uiweN1 ZbrmZCERso1M4t1U39GESd59d3e8P4CU4O4/SYQWjf+28Nl1gJc+sURtHhON/Pjtlz6R 34fg== X-Gm-Message-State: AOAM531BVlyZ1nPxfIwb9ZskMsISV+B3dVu5Hf7tF2DDltGCuUdcMrAL Mk12TA0bTupgBUiJmeMUNiiuYl80mSk= X-Google-Smtp-Source: ABdhPJx46q70MQN9RfNnUCvx1o4/5BP6Zn3gnlrWX1/ENSBxwfbhZqwBEZHKsgKnnTa8dDDQJ4CSlg== X-Received: by 2002:a17:90a:39c5:: with SMTP id k5mr16170324pjf.211.1633746048546; Fri, 08 Oct 2021 19:20:48 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:48 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 12/14] arm64: broadcom: Removed forced select of interrupt controllers Date: Fri, 8 Oct 2021 19:20:21 -0700 Message-Id: <20211009022023.3796472-13-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Now that the various second level interrupt controllers have been moved to IRQCHIP_PLATFORM_DRIVER and they do default to ARCH_BRCMSTB and ARCH_BCM2835 where relevant, remove their forced selection from the machine entry to allow an user to build them as modules. Signed-off-by: Florian Fainelli --- arch/arm64/Kconfig.platforms | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index b0ce18d4cc98..2e9440f2da22 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -44,7 +44,6 @@ config ARCH_BCM2835 select ARM_AMBA select ARM_GIC select ARM_TIMER_SP804 - select BRCMSTB_L2_IRQ help This enables support for the Broadcom BCM2837 and BCM2711 SoC. These SoCs are used in the Raspberry Pi 3 and 4 devices. @@ -82,8 +81,6 @@ config ARCH_BITMAIN config ARCH_BRCMSTB bool "Broadcom Set-Top-Box SoCs" select ARCH_HAS_RESET_CONTROLLER - select BCM7038_L1_IRQ - select BRCMSTB_L2_IRQ select GENERIC_IRQ_CHIP select PINCTRL help From patchwork Sat Oct 9 02:20:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EC58C433EF for ; Sat, 9 Oct 2021 02:23:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D85060FD7 for ; Sat, 9 Oct 2021 02:23:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244394AbhJICZK (ORCPT ); Fri, 8 Oct 2021 22:25:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244661AbhJICXM (ORCPT ); Fri, 8 Oct 2021 22:23:12 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 453FEC06178A; Fri, 8 Oct 2021 19:20:51 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id x4so7305139pln.5; Fri, 08 Oct 2021 19:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cvv2iZxij6FWrFEEKivGkcFAPGtCwuGKeJ0S/lB+6EU=; b=m+yu50ed2jVSOX0M9sHuJNhXc/nCyPAK8gkjfh8Md+/1g1DX2amYjYPMjtpTwTPXY5 Gs7HlVsnh0le0O2GjbBDvD1NpMwUKlDWCtbjVDDYeHncDRkYsbtrbTCmAncoE+g2HO2N wWn+Hi4B1CiA4U11YZHBUxnWQUfTKDH/Zx8tQ4zqCDk7rWMQxqa5GNo+DTsOUZwqueqG vqWoPlnY5MJ2H//RaNRbeIH43FXhBeniJnEKolir1M4ZcP2VHEyhIJHPaRpgmH68UyEV 00fag0vdS6sLiSorNyYSadp78Ee/oXQ7TKZ8J2oGlog3YAbAglb3oVvoHedmZwk1cqFr xDBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cvv2iZxij6FWrFEEKivGkcFAPGtCwuGKeJ0S/lB+6EU=; b=Q+V1mF92DoA5Nr5U38SVvs2BmRYjzqtgcr4kMH7CR+Kn7RMdXlZMf7690zPxrmGI1a M8h67qn+BUNENNXKCtYJsSDEXauoSHTQyRoM7cCXz7IR/Z7KnVswb7+jOykVDB9VeDeW KVWfF0nGDVvI3nrc1xFuw+CxjG9RgtFt677ds7tMj8Wf3G2/TBWZx89wSQtRknYPw/8d uTHfkGWUOCdgQ6qFcuPftMwp0Z3jLUwT+AMaes5siFoP/Dwlamu/B+iXgPtWfA0IokNe OmxD9Acp6s0P6S773vtShRS0TG09uoSaZpDChkrOfdeHC397gTsTNZb0RHkKi2ZmplSU uIPA== X-Gm-Message-State: AOAM533b3O3v9uFoZf408PEkOD4HPGxqrjqtFp62GV+YNZIFyAvSvXjl FDI8sX/Rj03v8QtglZZ3Z0Cubau1GNM= X-Google-Smtp-Source: ABdhPJzvTTzmfKXKSi4ia/rXDIDQdlTEWkuf3Sjm3NpkIWpoiQe/9W6A+86jjjFfVyWVz+ZauROyQA== X-Received: by 2002:a17:90a:1548:: with SMTP id y8mr16621507pja.151.1633746050443; Fri, 08 Oct 2021 19:20:50 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:49 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 13/14] ARM: bcm: Removed forced select of interrupt controllers Date: Fri, 8 Oct 2021 19:20:22 -0700 Message-Id: <20211009022023.3796472-14-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Now that the various second level interrupt controllers have been moved to IRQCHIP_PLATFORM_DRIVER and they do default to ARCH_BRCMSTB and ARCH_BCM2835 where relevant, remove their forced selection from the machine entry to allow an user to build them as modules. Signed-off-by: Florian Fainelli --- arch/arm/mach-bcm/Kconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 2890e61b2b46..bd3f82788ebc 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -161,7 +161,6 @@ config ARCH_BCM2835 select ARM_TIMER_SP804 select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7 select BCM2835_TIMER - select BRCMSTB_L2_IRQ select PINCTRL select PINCTRL_BCM2835 select MFD_CORE @@ -209,9 +208,6 @@ config ARCH_BRCMSTB select ARM_GIC select ARM_ERRATA_798181 if SMP select HAVE_ARM_ARCH_TIMER - select BCM7038_L1_IRQ - select BRCMSTB_L2_IRQ - select BCM7120_L2_IRQ select ZONE_DMA if ARM_LPAE select SOC_BRCMSTB select SOC_BUS From patchwork Sat Oct 9 02:20:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C13EEC43219 for ; Sat, 9 Oct 2021 02:23:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE38E61177 for ; Sat, 9 Oct 2021 02:23:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244446AbhJICZL (ORCPT ); Fri, 8 Oct 2021 22:25:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244680AbhJICXN (ORCPT ); Fri, 8 Oct 2021 22:23:13 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDC37C061794; Fri, 8 Oct 2021 19:20:52 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id n2so7245342plk.12; Fri, 08 Oct 2021 19:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2G1kdri23kWnlj1enPufIZN1leyxpMasJ2EyRU0acfw=; b=CfX1XQ9OItoC+Tck4KAw3dX6II/+kBQdyoYgzKxz7SbcfRxZRwW/6EdJYv7NEYHCBs my1ca7Qgs4lOy4TQWZYFbVw8rz2Le1VIt9aadwb6p0eMsbhussjUrnXIiIhityMik7q1 /zpGuL2BwJBMwVNCjPMMYks/EKT8COzsVTHA6zbb7JrfzlMDRoleh44YMllSGX8KBD8y HdQqqjjjtOiU2Rgc1oB4PaUD7ulGDvsKp6WZ35I1EGat0Z9eWuX1OnPQ5hdYdCT0pDFj CiS0r1f/FwCfkTFsVeZrqPIsag+JDjjCrmtnMGXHAg5ag87bYTRE6yXRdHLLd3eJVTP3 a7FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2G1kdri23kWnlj1enPufIZN1leyxpMasJ2EyRU0acfw=; b=KBJPIsktn4ZFNVJ2P5ZDwgqNP0j1n7QP3ckZlFNjexlqOw62iZorct4RCBemew2WU+ vfEDzSAiWmf/JkKuSM87MuBYte8Dnc775ohZtGh5D4SXHv6nDe2a9ucM1G/oZtpYB0rq twOIUu5xykIqMocdEQF7r+9sH4sPpw0Bc16aGwEXncOUsMsXKrJizswHdVpvmDOQXPZa hdfQRoIHxeUtHKSG1IcFMjiNeRK59+rKadIFqvZxPBCnqcXI5GkMUhF3QWlDAK1oOfvv BO+twzBrKCI+oKoJYv+DZo0TCOAJdYB1ijwKww+ECnW5MqiBwLshAqN4VeY41q2ypbHt fldA== X-Gm-Message-State: AOAM531LKpUhkW77LGV0B8DCgTGWwJDb9R+pM4pkEivya0VlOnO7MNd6 Jw8LemDzqHhLghDlO6BPU2Mq/n912Cg= X-Google-Smtp-Source: ABdhPJyhyJrlh/qrD1jpXbGniDULsoIKlimYb+RyOYtlOTE14n47zNMHqFBwjExwM0cBXcvomzkauQ== X-Received: by 2002:a17:903:2287:b0:13e:5d9f:1ebf with SMTP id b7-20020a170903228700b0013e5d9f1ebfmr12380907plh.75.1633746052048; Fri, 08 Oct 2021 19:20:52 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:51 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 14/14] irqchip: Fix kernel-doc parameter typo for IRQCHIP_DECLARE Date: Fri, 8 Oct 2021 19:20:23 -0700 Message-Id: <20211009022023.3796472-15-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org The documentation refers to "compstr" when we have the parameter named "compat", fix the typo. Signed-off-by: Florian Fainelli --- include/linux/irqchip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 67351aac65ef..ccf32758ea85 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -23,7 +23,7 @@ * * @name: name that must be unique across all IRQCHIP_DECLARE of the * same file. - * @compstr: compatible string of the irqchip driver + * @compat: compatible string of the irqchip driver * @fn: initialization function */ #define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)