From patchwork Wed Oct 20 18:48:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573049 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 92127C433F5 for ; Wed, 20 Oct 2021 18:52:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D00661038 for ; Wed, 20 Oct 2021 18:52:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4D00661038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=r3p/2FpQ/HCPoEcUgtvRJR2A0QvYdg6cCV0S+tMckTU=; b=OR/U8++0oNyoHs fRv4SwDbr7u7XpYfAkZ/JNdVEJdQqRZbWeYpw51qFsulM0uPZINRrBkdPn25CBki66s7t8eEKyqJ1 yTKMzhFyIzN0fGJuUgQacJ6MWUaNSqPPLJgwPAWVD3YyKqmfkN4tyvKszf4PcIIfQiH2Fc8VCR1CG IHxwwttAJu0/fu1XWaDPU7ZkZIOJAaAo3aPbb/YfikSEoEl2ce2cQaHrZi6sn1I3Hwa5RWtJW+4Tq /ckKKE4qjSaSmjSmX0jRT9lCs4+Ext6QdtA2p37/s5ltFzn8ptTl/1VBDmLPcN3EQEnC7vhsSs1jL GtBt4ys7RzFZhtfhZ38w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfo-005W2V-HG; Wed, 20 Oct 2021 18:50:48 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfW-005Vu4-KN for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:31 +0000 Received: by mail-pj1-x1030.google.com with SMTP id np13so3110490pjb.4 for ; Wed, 20 Oct 2021 11:50: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=AFQnxzJBoUJOr2jrRbs0eEL5JnHsokQL0/MSRypi9D3z2Cnb8e6xsjRopqx6kJsXzb 3/vfQ6JU1JWPLsYjesBk7L/viivaf+fmLAuv0k57UJd9S1S1isaQ5VdSnW7UInl4ZY8P rBgeG6ObrlPtOxQDgf/DY8ycdY2jKZIdzE6uPE71NVJg/xSZZ3g6XbATqHaYp18feDtZ oDZFWqiIkqhN1HgD+r20lHH0I87xBle9pCQD6g8yQwQN159mi92ouY7m9/RzbkaR1xmB NCCFB38R+ZCnmoFDrkL01g4gf5dou78VIXg61tr86Xq6zpZRXiXCduGeA9dsoxplsBCC spvg== 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=kumqNDBr3aewEoUKiE9YQG50Rc7q7DSAdeJTYqJMCZl7eT7FEHJhzD4jwzjAIYxyAS f/R5QkC4/Ga4MyrIP0718sqoIl0rfmFxSPEfYgkwtbdP8nHrolEEXIjUw5yjlLe4Ptxs 4K6BKnNR5/OX69hf7CiOi46u49Ge4s6skD2p4pWIhllUPIYE4zAGlPmIOHdWEBgAk//u /WHzmrEfreUMqy3ZpyePaSaMtQGwbJaqcx2V+uaBeU/UmrJJGQOJwn05ZPPFAcn/xH36 xAnqTIkMSEOWcbEcpYiH1OcMQ8CJfb7HRO2VAAjZdV+RRN8uLoJH9hMkD08xzoWtHSYE kz7g== X-Gm-Message-State: AOAM5313jyKCfaFTYD6x/D2ZQJGCaUDnSIRKLl/Xw6lYwmkRR8ajoQcB VSlJS8N1Ym7+25JlmkJXFAo= X-Google-Smtp-Source: ABdhPJz2zVU2zmA1USXKi8K+wWLy6wjyOoeBBh9yjG0hpBbXJb53QVX7O+TpCZLJPzXBxUCjv3wZSg== X-Received: by 2002:a17:90b:3ecb:: with SMTP id rm11mr886865pjb.110.1634755829860; Wed, 20 Oct 2021 11:50:29 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50: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 v6 01/13] MIPS: BMIPS: Remove use of irq_cpu_offline Date: Wed, 20 Oct 2021 11:48:47 -0700 Message-Id: <20211020184859.2705451-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115030_690690_41CBA7BB X-CRM114-Status: GOOD ( 16.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573051 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 ADCEDC433EF for ; Wed, 20 Oct 2021 18:52:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E27A61052 for ; Wed, 20 Oct 2021 18:52:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6E27A61052 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dX7z4Kl/qXNg24Rf2jbO+TrgQCc2vwgDm0pndgG8lAM=; b=meKrCGf5FGXgSL 7yTo2u8G3Wkj0oB6HNsjcW7BCbsijbVuZ8EUh7HpMWebj/9BlBBaA5oiGe/d28Jvu4FZLpjY8sF5A HN1kqCUSGMhPEt2VJB8Fo260p8YAwkl8VyYEgmhxaz8yadVQ4/mAtrsqq5bFEJK4GFKzJvDN5ECS+ iyRGdJoK74aNdoMrlVkQ4Gj9j1A9Ma3RK3AyXrMp9vib1oxWJrfkvA8BCXl22tbMbcCEWWU4lzGAC h5JlsejAmiB2uyVaO9/62Y0bDvs3wnfDODUTGP91ER5aWh352rtDaO4VW0p/oBposAhg+2j1hmSBv R0/pWymoXVCEe2JapAuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGg2-005W7T-Ab; Wed, 20 Oct 2021 18:51:02 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfY-005Vub-4z for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:33 +0000 Received: by mail-pf1-x42a.google.com with SMTP id o133so3726589pfg.7 for ; Wed, 20 Oct 2021 11:50:31 -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=CwnpnmqoUyzLPixiuryd7FzMM5VmBOzK2mWYjj4QKPObFUKVSD2YTl0IuVjioR1efF hO/I7iPFWkxHOuuUjnkZBdHbNxwOVAOAFwMx2gNIEHHFZpf5AbariY/Hh3adtGFY2oM/ K8/YWv4dateizvYxq+XyVSPFnqsTDC9Q6FC+vpJZQ8chIhHsdUeBWhQo3xVdIESv2Wku T//3yC6Y7rLkIDzxGQOU60VLlhuw3hFmjw1UN1Za373gXRcs30OH52LLtP5YanCHzzq0 4oxVA3NHHx7fcF+LXh5JiWz0/OiV85z75JBZykZnHTDmOTVFR0YtaTvndGXZeo98YdOf eeuA== 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=2cWAiacVQPEZOf3SoO6v09jEjMHXaf5RCrUQjvBJU4t7OO2cgyVY1qbnxbdw3QRXF1 0NU0z8zUqtcHK5S+u/DqsHZygjrCIoozz8OIdNfFwAwI1DxOf8PQB+UxhkDlIcukyYep 1u/d+xaHg445wAI8AGqeOErk6IjOoBK9snIWkCnJHXwhISQlHdNbX7ayjz6dvPVhEggU g1SnhLiH3ByKDkyW08GsNE5xPautxoXkQl6kAGjKwAmI2Z+Xl0zc3Di08XkvcOlU6rBg HLuxvqUemjfmIlXxc38zVs6McjP2rDpwgF7KX3xg721Ntm2jklu8JIXuGths68//L7gy 1JGg== X-Gm-Message-State: AOAM533pmR9UGsMUfOHikAaasp75t4GC3YwaAuBTAWa3V8CSZBpLWoTq 982W/NsaMm9zUwDg2tH/LYM= X-Google-Smtp-Source: ABdhPJzbj1QnVdC00Dq8Zv2WOsoZwPyQb9sp5RFakZ/P6+eWTPhc+1XfO06ZwHAyNL4/qFNke95Lvw== X-Received: by 2002:a63:7b03:: with SMTP id w3mr752742pgc.285.1634755831288; Wed, 20 Oct 2021 11:50:31 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50:30 -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 v6 02/13] irqchip/irq-bcm7038-l1: Remove .irq_cpu_offline() Date: Wed, 20 Oct 2021 11:48:48 -0700 Message-Id: <20211020184859.2705451-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115032_207284_40070A03 X-CRM114-Status: GOOD ( 15.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573053 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 95A66C433EF for ; Wed, 20 Oct 2021 18:52:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66BFD61038 for ; Wed, 20 Oct 2021 18:52:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 66BFD61038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n9reuRIPVjKqnJmb4/HFW15pg1LEXrSsoTLiQ4fWpMM=; b=OY01epwX2OZZyE s76QIlIvs2VC/Lb9Rl3TAFcIU55defOfD316izKkbFKBgYOnEIsuER7meyRBtP0blYGiuF43KI4Qn /195J9BeTWzJV5EWsl/UTo4MR2dg+YK3li5KIcwr3HXLqoDDeay0M77zMfk06vJX+Aq+eceRhsi88 F9B2NTpChMpJ0w/c6mF5PYf8CD1yplaZwXA4KSpTKb8N+z/DGfvc0+yCY1dB3SdwklTyv7XLLBWQQ 025e7/OweDsZ0a8FpL8SzYzkEjeDl4GRRZEUhjagh9eZj/MJHxyfMVyfhQDJNhTvtgnnxfQm3/UdG Li70YawbElFMJwX7Qkcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGgG-005WCZ-Pb; Wed, 20 Oct 2021 18:51:17 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfZ-005Vv7-HM for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:34 +0000 Received: by mail-pl1-x634.google.com with SMTP id w17so4938868plg.9 for ; Wed, 20 Oct 2021 11:50:33 -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=SyrWs6lXbrFg4nHi9gkhr7imDQDPwnVw+lm9K8FuVphjz6EIEZ0z6LRPP/OaGuisqW cjP7NfsFeBxJFbCYn8vRRYJ6Jkx5qMdtXLbj5iMuXsdtgVjprDYIjNDoa4qUlFrPSDhv 7576n2QSrXx0bn9ExpMoT8ldj4EfQmjxitxl+GzPE1tKCL70QCXUnH8h/x4dVHXZFOvs dFAznep6vLEwf+HUzNN3VQWXOejV2dTfmUxSPSAhUTJrioagbdIWGUHWAXDqkPWAJKH7 6ccfBk0a1tq4KQGbNKfaLbAjbJvdd1FMd3PxOqT4FkDwSI5lLoNaXpv7mM04vLiwyx9P hRZA== 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=M3UOn6/NjB4UcMsBzP0pJrVZTYxLIGcgaIGh+tR/but+g6r9v7m6dvFFTz0o7xhoBY kGHlLya2URuaFrf9xee1Ap0hzYkx+dYutWnxOuVoHQJEX0jwDv7hmHb2UQJkRURxfXvI V+LYnLk4ycyfOicEOgitPfjrA+xTlYdq0HKdEqsaJocbpNIO9cCW6IHmSSuPO/ERj/Pg Fnp3yjJlBATaUVg7tb9GmtETNBijeJnp9FkedXl/m5nR13tQeN5gkLJSL6K/D4g2FktW IwpgsxXBJYd23LOus7F4gHGHDwModMqmseiedeecquVjS0YhfGNUoRuwPhfbcfuSs6Xh hzZQ== X-Gm-Message-State: AOAM531qicmq4+XAV/qpraZwXQiiiLrR3d3GaQvkTmzibrRyxv0ZeXNl WjV13RhGyOZW7aZRcV4n8pE= X-Google-Smtp-Source: ABdhPJwFIhnmeqqGhE+xO1GCa3Z4NjE7orcRZ2tZixwP4cH85iMKEWIXUdQa3ZmRj7ET1xyr3lZRQg== X-Received: by 2002:a17:90b:4d84:: with SMTP id oj4mr745231pjb.58.1634755832707; Wed, 20 Oct 2021 11:50:32 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50: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 v6 03/13] irqchip/irq-bcm7038-l1: Use irq_get_irq_data() Date: Wed, 20 Oct 2021 11:48:49 -0700 Message-Id: <20211020184859.2705451-4-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115033_586426_D9ED6DA0 X-CRM114-Status: GOOD ( 16.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573091 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 BCFA6C433EF for ; Wed, 20 Oct 2021 18:53:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8458A61038 for ; Wed, 20 Oct 2021 18:53:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8458A61038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cbXc//a3QKMZb5S6hDJlArxbGE2QXmiK2nSjyVtT4AY=; b=3yyo0fXw8MrBx+ IUJYEVKMSdr+A2Vqji7BgYBsm3sjSCNDTOeuQApX32A6kGUEJBz6b9rsg+S4MNV5qm+8magaKcmU5 XInSbd91S+/BSqn9oDQTW2IrJXE/gSTj/g9adyi+EVZaH3dPGwRuqVPBjOX8NJQ31ORWi5Yhhw6Cr RQoKiGKZlEKUurtsbrYEWBM8I8iWl7btJSEybZDD96RaUFInXgP9L78PBSyNTLsYF1JCbscRuC6K5 QqXCcS5YPg8AUTgxCcHeDjLXa7MoaDL9cnX0E05Dy+QOqKkaihbALOMgOhbuKndsUWbpEYtGKIBhF nszgXdiCIrRUckV6visw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGge-005WQE-Bk; Wed, 20 Oct 2021 18:51:40 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfa-005Vvz-Ud for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:36 +0000 Received: by mail-pf1-x431.google.com with SMTP id c29so3740810pfp.2 for ; Wed, 20 Oct 2021 11:50: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=G1RiT4GRKPcXSkOjyrks/jOWZL3DTQpMJtRhCsgVjY8=; b=hEsPXiTNsHEKrv7LrTxImma40UBastHpzRHkCpg1UyvZaIZUem+ieQzNA9xZ4dh7Yl bTBNV8ixGN9/BjYTtrdhRxfCu/4LZAczT1Kixt1lWMUtF//kUIZ+lYJIu9x73XGL6Ma+ wN92PvdzevimIS28e6BanTaolgM4RuwDPLbENV/WcYm8zhdj0OD95KUSlKarCrVxVXPE 9FrGXJTua/ydZn9xrhej+AsMzNnn1B6+bAnHKUKVpdxYIyT778CWElDRkj+8S+6gT6ef cvomTzR5OjtuqDbTHYem5Mm0IB7+TNjBwu5LW2QZ4R6DyrsERCSiHhb08EdwueYOcFeY U49w== 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=EeIOt6NVueAtzUsh5jRpec9SDF//oOXTpUNYe/WpSpy8bvw9/xwQO/uTaeh0zFuN7f 3zV248tP1YIKFEcf5Hb761ZkDw2boklA54JQmL2Z0QMU96YoQfqQeVffaBlpz58YNttg hxgbt0q3+Qz424CGQ+bfKVrtd6fXMKH2bt7u9tL2+ERvYL/r4TV9jEsAvxy5oF+6CisT hchN4cimDA0SzXQHryjTmFkf20CYNGnRz2u1HfrPWZ8PiVOkrPZlOl99tugBQ7bt4P7A 86w7ugM/HsjIAeJr0Cz1iUipTZcUUPDvHpW9IoZgnS6dn4mfjnxT2G9iFZGu129qdr22 4lHg== X-Gm-Message-State: AOAM530hgkqu53azoiBsHEU/MhsaEGAekfaeHADBhp9pRl59jNEesV/q BZCSrYPp3VdCfSs1OnIJlT4= X-Google-Smtp-Source: ABdhPJwbzWHKin126tbJWWzQImBYaNKIeFtG9nT98+ylY4/8HfKntmcN0jXAbn859i8BkSEAZ414gA== X-Received: by 2002:a63:b909:: with SMTP id z9mr809070pge.140.1634755834115; Wed, 20 Oct 2021 11:50:34 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50:33 -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 v6 04/13] irqchip/irq-bcm7038-l1: Gate use of CPU logical map to MIPS Date: Wed, 20 Oct 2021 11:48:50 -0700 Message-Id: <20211020184859.2705451-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115035_005131_EA202FD9 X-CRM114-Status: GOOD ( 18.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573093 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 224EFC433F5 for ; Wed, 20 Oct 2021 18:53:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB2B261038 for ; Wed, 20 Oct 2021 18:53:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DB2B261038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uwYt1LbcutwbTHmo21nE6BAa4F3WOOaI7MOYHYOC3yU=; b=WMD/nCxFqVNY3L f1em59QjNZVjvToSYzb3NX55NS1mJ52+DFtdhJyT68bIZ/8tdstQEYBnHgda97KZX6UWm3d0W9Vug 2CqqGF9mAqqN5ZwaTkvkOOSPWYh2XpqkOsslaKx2cvScN5mFjRUOGH2JouUg+3oZCOlS4lcNy/j6g 0aUiD/7ltfjC3MZm1jciwRLSKQA3VoSs7ubERbzVcMnZWImCs85FOQzFRNhbWo0UoBRkLnCzQglbq 8z3ho/K/keKrErtpYT4NX6BghjiRgu49aeINJM8uNp+fRLZK81DgiHDqC9XTevt3gaxB0KG279s0w UENlxXNo7ggGqVBJaH+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGh3-005WfG-3v; Wed, 20 Oct 2021 18:52:05 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfc-005Vwe-E4 for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:37 +0000 Received: by mail-pg1-x530.google.com with SMTP id e65so20917080pgc.5 for ; Wed, 20 Oct 2021 11:50:36 -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=LDu3pf8rvY5urOjKEIFGzX9GJy3XBcqPCuBUIcUK+kfAjpJbhcEcJj915qtAuWZBSD A7GSfxuDgoHIVdM1pvrV1l2KhlQ3Zrt+/9ECpx+n/Zq46Q91yh1VGYtOXKBeqG5JTwlv wWutEFTsFCMMOO6NsUlBE4yKLDaf2ZAKcUUEhOWR1wPqU2e1rkQOFJpxHaJTzeW2pMCk JuMHA+i1Oa4yJG40Ez/uBn+gGGeR6jniPaAKN88KSLTvPeHbCNjas5siblOCa2LfjxP4 FbKLtp6gTqTSqm6sWmqHEDa4tmSq+ZX2yv819oIz1KQMoljlK9hc8XQbujLFRoBcMkWk PfRg== 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=SIYrGCbe20H/HwaPT/jJo36x9zoWdZ8sOcrHBZAlXaGRplRoAQIXWIGqx2hCS5It3M CIyQ7XMntqKLzl8sOETR8E9cFH8nJxkeqP+ASgbiRnl4LUeTxH1cyMEPuMVNv5OMmg3M sCkg83duOXH054j1WO6z1PsGnl+W6OxAihN/NdSflpHWM74DpO7TtVSjLbRlAsU87uU3 K63nSKIUEth0h1rarGTGMnV0ahpIFvAzKOtZIrNZpgK2dqEpBZcnWJKHSOYpGphBK5An qyxLUEapr89+8TS6lcjScQl4oSQ9jcGncTSMI50FhBM8EMCUA6Kuz+0QU2x1suZqgaYD 9AcQ== X-Gm-Message-State: AOAM5336vrFcEm81hnTkDhjOPXl3FIDsi4IpnfdqkLnuAeJ3MHa/AFBW Aph+eDvD+H2MfpbcwPT4NtJAblIfnY0= X-Google-Smtp-Source: ABdhPJygbkliS50fhDf1AumcMaX/Moy+n/vSPzRYKRsZzAhaf9DLj3uAwgGzpmhQXsetjhV5r85KcA== X-Received: by 2002:a63:bf07:: with SMTP id v7mr733289pgf.475.1634755835563; Wed, 20 Oct 2021 11:50:35 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50:35 -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 v6 05/13] irqchip/irq-bcm7038-l1: Restrict affinity setting to MIPS Date: Wed, 20 Oct 2021 11:48:51 -0700 Message-Id: <20211020184859.2705451-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115036_509303_4F55D2F8 X-CRM114-Status: GOOD ( 18.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573095 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 2471AC433F5 for ; Wed, 20 Oct 2021 18:54:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4FF061038 for ; Wed, 20 Oct 2021 18:54:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E4FF061038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qztGlhJMB9Km7Yp6PpvERY24qCHnd73E6qGjtptqDQw=; b=wPn3CNc71ittRd 3+VovcryB/+2NNVYzzTyQsJVKSNNZM7aKK/BQmtCHU2QhJfHUa6jyT3e4Euqk+XLTuoEtRbTRXtKH NZwT6qeF7TaAV80iCMny6uiaGgzEoKFygmtQD4MDAFjIGCfSP1Hxbi79ZLbueG0AUZiwBd+vbkW4E krInUP8g3/tNO5vnaZbF6txPcp+QvvVoUlQ3Gs5sPpgEVC7VzwGbbAB7ZvPIFVEPp6j+JFQ8VAkm0 zqd41J43Ul7kYnh6dDNHNDW6gFAnxv0xLdJXtbZplY71RzkRjN16otePxZSPFxhZjmgHh/Wa2Jb9j di06IzuCV2NYcZ9hUIOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGhV-005X3G-4T; Wed, 20 Oct 2021 18:52:33 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfd-005Vxc-Mi for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:39 +0000 Received: by mail-pl1-x630.google.com with SMTP id e10so11883948plh.8 for ; Wed, 20 Oct 2021 11:50: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=IqTvFkxEB42F4FY7x5fTTUp3BY0gcheCImqFREsoxYU=; b=bjEeCXoS/MV2lILX7sx3x57v6O7dAMDJp4lPpZAWJfBF4jTN4UqqTHl+QrRUOY/s+L bdnlLfQyQiss5MK7iviDHTvEWo77aq3XBNtiA939ZEAS0hDKWLgm3+Rgqsx1tnVVFHkJ 4FIE8M83MSM/nzj4X/KodUG9TcOG24j9Kc2OHdAYUvbye/Sf4jn1HadHogHTuq2bHsfY JoVZiUFBKpc6Mt8Flx9+paujem6KfrjNksNkWBudVy3hYzjAx6vljCSSzVQZa+NOw8s5 0w9E/xfYYJ7BbNQMZlu++oZJ5MzRO6qKcBL1eiaGrJXSOEi6Hb7QFpRkHgbickh/D3RE 7UDw== 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=3BZydeQmprP+KX5Holf1KOS9dkEyFQzj8erCHlEyb1N/2Z5ekK7nMO5BlLJdrpH/5/ 20jI9IH37KFSEUKIBjsKq9SU/E9aKdFlDbf/N0DHtcCqr8+VWVa6cuJHLnO5UdLXjdmy GNh0BYJ83zWVbr84G/fk/7O2pkfxQias+iEr8cW3pg8K7Bce4xspG7aKgq2f9A05Ef9Q sbewRnlKW75m4HR2B1cOKwu/ae56A3wBwjdgvbjeTDd4frzrr+Fl74udK9Aqe6uUPFyS G7O7Y/kEqOb4Un1U4IMEwRngGW+voDJL/ASzYw2JWilbzPPgy2cLoLhujejUiVo3mVzo jKUw== X-Gm-Message-State: AOAM533gd0yJiY9p4x60IOFRxDR+fc+3Qis0uYAewvhF2v+A1sm0fuz5 kB4DJTkEipXTq7/sQJ52H6A= X-Google-Smtp-Source: ABdhPJx3jyDsZ+IgZjNzgGUFZlwRLmIJv5uJ49BROBDuNB8QqR9XLHCzzN1cs4yHcgRKNe2KypyH0g== X-Received: by 2002:a17:90b:350f:: with SMTP id ls15mr716871pjb.220.1634755836924; Wed, 20 Oct 2021 11:50:36 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50: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 v6 06/13] irqchip/irq-bcm7038-l1: Switch to IRQCHIP_PLATFORM_DRIVER Date: Wed, 20 Oct 2021 11:48:52 -0700 Message-Id: <20211020184859.2705451-7-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115037_778057_3659C65D X-CRM114-Status: GOOD ( 16.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573097 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 415EBC433EF for ; Wed, 20 Oct 2021 18:54:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1191361038 for ; Wed, 20 Oct 2021 18:54:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1191361038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zp0p34aRBR+FtXcEY33TrVNXmBrkAw1zRoraIIipP3w=; b=LAzb0lDNPszdJ+ imlNIMViA4dR47Zkfv/GDCxoNeImtTrHt6mEPZQQ+SHKWHrg+53NHMeB/cWqn76nstJfOgCNvZ/Mb oWLbloAM2XI0bRqGfcOnbjv8w8pfXUYaKYSUyDNcwGkRRjI2BJblitaBGQ1tVyGfp5LGYIKUv47hs gAKhh/idbiyvDj6vDeh/qHthz+N79n6lk6p8xgSUPcqwg85JcE9Fq8TFqPOzHSeaDPdKZOkuZiq+/ Oo04CdDPULD6ORema/FcWugnW4lrkPbrg1mlxjW+GjQL3vs9ZyItYW3zXaQxaSfHSUpiS4wZ2w/gl BdTZ368gx9QoP1kaY0Rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGi5-005XRr-PS; Wed, 20 Oct 2021 18:53:10 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGff-005Vy7-5f for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:40 +0000 Received: by mail-pg1-x535.google.com with SMTP id s136so20098615pgs.4 for ; Wed, 20 Oct 2021 11:50:38 -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=eWNs5Mnvme97WQSMJokR02PWbB2Lbzy5vzIqzjIjmzrxvXbCddeL0g1HcZOptmr9vt c+FAWUzmQWJjMRHPgSRszzdm54w0lujwkDFs6c0hfReJUM8diXofq3zEB2iBK0W7hIKa I4uh9s6tMyhUdQUmEefAO8aPpZjD95xd6NdaGMbBj1hTbZO3nnJyO1YJ4dwIAzx7+Go6 MEsFOX/iC9gWGngcgM4XDSWlwFSTKuoDsQPua1Dd8KExboRqJyCg14aZTnl/VopsSOvC LuibhxzAX/OY8QdNFwPGx2+FoiUJuURG0zCw/u6Z0uKuyVoIU+0csM51cAkjLzNB1Kdh 38wQ== 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=oaOz6pDQ2EtdP5BCYwqsB+nfq2vi2+iOW9CvOnJ2br7JsVhtHoOwlhUo+lbIqPpUV+ DIbk+VcsfE5gHhTumhu5XF23JGdAklSKT2tzrE0ci3syoQf8QfJU2HfpbQf4XuRIBP7s d+rAbaq8X+/kDvFkw76G4EicbGaMB6H+VP3j3ESvktgH8RbU9FmXfa0JK3cUw1Kb5yo2 oRF7GUxK91zmpjRHlmGbP6fRRb7hchm4IUt3LvAbwc+JfAqlVDWMefX9//NDvDo7d2BZ Xn7bOaiPXAalX9cW8Zdw2grTORVkaoNCh7k3B2786MMAEmuKHnwyALQlNakEXXNkYuFu U0FA== X-Gm-Message-State: AOAM533UBjK+QJKQ0yyezhj0wj/0l74y/T9/TSZsCp2fSdb/3Nd9cjbX rPdISYkKzK+s1DUoTEpKrlY= X-Google-Smtp-Source: ABdhPJzySpSnG3P8ExOadZUwVRbxgdNtASFVaCKX6wZfO7HyjtvQIApkthnPzFi4Pp/i7ELfom0RYA== X-Received: by 2002:a62:1408:0:b0:44d:1f0b:49be with SMTP id 8-20020a621408000000b0044d1f0b49bemr1073536pfu.28.1634755838331; Wed, 20 Oct 2021 11:50:38 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50:37 -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 v6 07/13] genirq: Export irq_gc_{unmask_enable, mask_disable}_reg Date: Wed, 20 Oct 2021 11:48:53 -0700 Message-Id: <20211020184859.2705451-8-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115039_227718_BD569493 X-CRM114-Status: GOOD ( 11.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573099 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 C032EC433F5 for ; Wed, 20 Oct 2021 18:55:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D2C8610D0 for ; Wed, 20 Oct 2021 18:55:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8D2C8610D0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3qnRbArCl4gqMMKVot0gFktSVXCRf53Q+4rvw7V2aZo=; b=PcZ92qnQtjcdXd eIyXyfToiDFq3gQ2egzNabC8BYadePPfDPg8PBxTadHyNywowYuVGGnr9SY5ey2aMGvTSuRKUsSyx mRIwZ6IABS4NE7aXPvVknZMdIvGy5SuFIv0dScYkb5kS6Z3y+q39AeK930MVMMMTw7w6aPnQBm8Yq wK4dQa+2C17IEKUNRbTEJTDibf5wXWC5suX/ZM8OHLj5ih1D8GawjVpfP39u0OL9A3iiXkduWYGjC GIqQepMHzb+J4aUA4U8QHPq0enpRQCYBVxgZU4cdDo6hqYABoRNapCyU7O8NAK7ybf/R0araee3wt 96iqzZ6+l40kURWS6omA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGiZ-005Xij-SJ; Wed, 20 Oct 2021 18:53:40 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfg-005Vyy-JW for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:42 +0000 Received: by mail-pf1-x42f.google.com with SMTP id o133so3726933pfg.7 for ; Wed, 20 Oct 2021 11:50:40 -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=UirhVuEYQ5YRDLddibwKe6WQg+eSAFCJ0rkSr9jpp68CEOEQ6SuX9lu88rXlFa38EY VOiwNtbq7ikViek61AYuFHwKeJHT0uUfq4qoYT/ngAs+NoD2AXZgZdir+L14d2OisHmh 958EomM88XSNnP3Q/vY4MH8+oJPaGJkox9dAzQH02vwC59tDYTvUHbcJ6RDmfds5z8z+ kJhjwfKIEmklD/c9lJoFLdRZQ83LjHEcm9EiIpPbam/g2lDE769JtdXMFt3PD38YA5yt TEE8OptoVi0LqS3r/8q+2NMVtrcDJIHMuewnfVa1PRUe+oDElId596KmoU7SMIwwlSMG lemw== 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=ROoc6IzgKM64LfEPG1yUbgRkO7z7/zIuR37DdoVzibsLYHHe5m3yjfcDJin/9Avfn8 bNqGCXMOxnJ2I50iDVzOIx1nHR1/R4hiB7Qg5V0g7cC2zMs7AchwKVol13SbhLzOwut7 0VNJGmsSDcgU8moau+2F9zAGN41BSpdxusBCGEvDNnHYQRsUqRV81xLGdIOR39tppXZT 31Ru6uvEudbmnSj6DzGZ9O/Am5sroUmeFxs9nOy6lhl3ISPKhvolywaQqnvwkbpmLMCT +KfXxljn3jjAXq1otJJIEk/cquimZP+SOjWEQt40vInbJbFxYuMKagacOZETBcSQywD0 5mVw== X-Gm-Message-State: AOAM531DIoZ44Q67gnqIc0Q0yvq8aHdOOC4CXISQ4KXC9o35x3YZAM7X jwHr8G0hPkrrV954gp52cwk= X-Google-Smtp-Source: ABdhPJz2siPRvdTXqPyQUufJKl93/Nr6PGo5IQjOq61Hpf6PWrGgXwGyJ3hcGKvMz1BYf0MDF5Sg3w== X-Received: by 2002:a62:8f8e:0:b0:44c:f130:9291 with SMTP id n136-20020a628f8e000000b0044cf1309291mr626909pfd.19.1634755839778; Wed, 20 Oct 2021 11:50:39 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50: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 v6 08/13] irqchip/irq-brcmstb-l2: Switch to IRQCHIP_PLATFORM_DRIVER Date: Wed, 20 Oct 2021 11:48:54 -0700 Message-Id: <20211020184859.2705451-9-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115040_687728_8C76CEF3 X-CRM114-Status: GOOD ( 15.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573101 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 772AEC433EF for ; Wed, 20 Oct 2021 18:55:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 420BD61038 for ; Wed, 20 Oct 2021 18:55:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 420BD61038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IVcA6d0LEGX9QAguQ3JTJJAQ3jpS8RGXOJZxcRXOqT0=; b=dtGF1e8/UPf3Am bs1FQmoki2tBIypta//9iHay+TTfjb9uVNzysj6aI7oiIkrvpM4AnTJPVnk+/uS9ieNjVUe1RLvz7 Hq/W7SJJtRusirITV8wBxv/GrlWfUUCb9qicCCILdk6/K7R+Ez4KkbrjKi4CCDAFuoj0lSZQQy/KQ vkQiByG4t4IIKUdlAPixspr3LgCFcNlNkwjibKLXT0VCGS0jWlnj6j5Htzus88A64oPDuyTgv0Qq4 a/0d45XuC0OzWJdgKy+if95iCblgSBqgtYi1xhOxegi5sNFF86bajh+pcUKHlc315fVavoDusCjXg e6IWAw2TQxq8WsDh83PA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGj9-005Xyf-Bz; Wed, 20 Oct 2021 18:54:15 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfi-005VzU-28 for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:43 +0000 Received: by mail-pj1-x102c.google.com with SMTP id s61-20020a17090a69c300b0019f663cfcd1so1236120pjj.1 for ; Wed, 20 Oct 2021 11:50: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=HFON70fhXDszaD5v9yYPo/8gY6ecjeQthvGng5DXIkI=; b=Mzy2wUwwrgxYO+uSY+T18zl9jfPNUswIO7lN+3pI57CBhPftgCLNP5tkNgvmJvHC2H loG+OgcUxPnt1yKviyPjNI9h0blKM4SJBbG2W6DYtOeCZysqyxquMjXs08Ek/ecHiN12 BswJNp2LEB9M5DHv0fuLDVojuAhikPMP/xCMpJeju0Exk543NkENcKx1j4KQhsviUain 8koba5NGjc3QWJSiG7DUk2EUcSGopAK9M9kBBUtfceygCCuP31yTgd3Raj6cTQ1COG5X hw82ONYetbfeO2grhi6JrRNc9hju08wWF+FZvlXhMK+avMG0sZgO+Okgdljy4JB00y/p uigQ== 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=aFHwKXLY4LnJjT1q6t8FOYW7/+iAauk8UNmpXgHH6NcXX9Tne71EnjPHYnpqWZUm8Q 36KVslZQNs+4Qt73puHrG93Tn+ds/iEu2/VIBBUPkvGFskVBaa5Sg/Yucz1e5+quo41Z gfEu3zUps9Hh4vQua8N5ekQ8OvxGRjuMo6gBWIpJPCRuU66GRy3VMZFerWO+ANsHHXT9 pLJeqW+9wZlF5vF3xxPjgsexA3XcSXn6Si1DGAdAP3l+GxH47xv2HW03XcgYQXVRd2QT 3isiQ6+UvCSI8ERzx42C4JMVpLr7+z5zrAtxgGpr2t/ItHmymIMKeLYEWsATAWdfsjBK ucGQ== X-Gm-Message-State: AOAM5331u2GvfODkgpEQNxHNTOqc/5WEtq/amGbN3950X4CHUG1BQwRZ edxBfkCWzGq1cowuFAqY/bQ= X-Google-Smtp-Source: ABdhPJz1Wx2cqB71TsgBZ8Dq9KY/cISYBxSq7kN/YB/55yMFADInG8jworo5xA/iQnanXu4glCiUKA== X-Received: by 2002:a17:90b:350c:: with SMTP id ls12mr783890pjb.36.1634755841108; Wed, 20 Oct 2021 11:50:41 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50:40 -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 v6 09/13] genirq: Export irq_gc_noop() Date: Wed, 20 Oct 2021 11:48:55 -0700 Message-Id: <20211020184859.2705451-10-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115042_148785_F70468FF X-CRM114-Status: GOOD ( 11.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573103 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 12494C433F5 for ; Wed, 20 Oct 2021 18:56:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CEDFA61038 for ; Wed, 20 Oct 2021 18:56:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CEDFA61038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PdptxS3xuTJyayS4KIC2B1/opHo0GtHX2kwG6fhaeOc=; b=zbVYmNJrOY3tTz Gmeoc4J2YqtVtTH6j5kI5hSSGIz9ahDBD596V0eDKVeItw3x341PYb5GFpY71R4wqaUvYRPGF1evw KxPbma2HT10+J5mumusxoS1KPKPbcZyW5KYqUsez/csfSjQEVXxe54eF/3SGDsX8rrkOVFEdeBSmI Idwv5s0Ms86ERRR0Hl4KgshTQaY4vS2wxgsRyouqtZY1RQGw3K2+mpsvTfT2wuPpufgEAefwWQbOO kbHMoiPXvJMpVJ8szZhYKGKOmP1CjswUWPs0/RHCZ0Q59jhcjr+T8p51hl7WSL8xrenj8aTW9V25A B6j9kf1/4C1Dvs7sinww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGjj-005YEd-Sr; Wed, 20 Oct 2021 18:54:52 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfj-005W0P-A6 for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:46 +0000 Received: by mail-pf1-x42d.google.com with SMTP id t184so3770640pfd.0 for ; Wed, 20 Oct 2021 11:50: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=DgNlnw/X0eZIQ1orBNwNN4B1FWjS3NXzL3tygL/Zpc0=; b=nclhbtnO1d3VUqCjuO6fbVBLJwRCFzgkiQCrv3xYB3HM5GTyWvBhu6RljQKGdK2pK5 FR176iIdQqTr2RIJHZjvYaiVc8DtqG8Kbl30nEEs5hFoUAMhNRAedi+tAgyIhIw2qHbY Ah6th4TjmsOMkzx1p9m/a9z00gKcRY1FsArZ5GN/5oDFODb5uFWozEanMBUoZ6aKDxiG zWu1j9qJbrdumFiOrnH9tMw8uQWqPs5UYM+hatVgL/rBcTBxkszxKOv81hdZ38ezJL2R KPmZAnmi7K4LCsVXzYCCrxAcf2u+tMkzemWMSxWNfVLCrJrwvyHXKpP1nTOWgsGza8/k DSuw== 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=DgNlnw/X0eZIQ1orBNwNN4B1FWjS3NXzL3tygL/Zpc0=; b=fkdBU5ljezchxgsjlTF3AOwZfsxVVZLE4m32pFNUIG88t1S3pgxLSyJ0Vmi1xG2lhR BPZvIFyG1i/r0QxLMZPfHWDy2m290AmaOD695cMTTvkuHg4PThxFUgH3zgO2psTz24hL AA0lmL1GWf7oE+Jqa7hd+V1BMQyNfKHRnLYoc/3e+eOzg6PWABVFGIhJap1Slgs4kc2z FDy0sKy3gkIrEL6mS0umSzQ45yhs/kPWhaoiMKCtl1Y0SK2HYKM5g2oT/iOMDpIzempq zHXLjMw/JTYK++aeRGSEiJpuXJNe0J73++JHqSFKKY4VmLl6v65zZvfNhIA+fb5FW3sz 0QKQ== X-Gm-Message-State: AOAM532cbA7ThRrtbuyH/NLiKkn3D/pi7r1Q0oW1Z7K8AsIKzxLdxqeB wStvWdi/Ix5MtS/tVFmX5so= X-Google-Smtp-Source: ABdhPJxxYfaTpM34yX+EnA7h6FN0DD/aOb+FRn6t5KRFu0Tua/JQSghv55UaM3L5Rms0kPaDPlsd8A== X-Received: by 2002:a05:6a00:2389:b0:44d:6d57:a38e with SMTP id f9-20020a056a00238900b0044d6d57a38emr1053648pfc.50.1634755842459; Wed, 20 Oct 2021 11:50:42 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50: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 v6 10/13] irqchip/irq-bcm7120-l2: Switch to IRQCHIP_PLATFORM_DRIVER Date: Wed, 20 Oct 2021 11:48:56 -0700 Message-Id: <20211020184859.2705451-11-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115043_419524_2F839354 X-CRM114-Status: GOOD ( 20.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 | 21 +++++++++++++++------ 2 files changed, 18 insertions(+), 7 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..d80e67a6aad2 100644 --- a/drivers/irqchip/irq-bcm7120-l2.c +++ b/drivers/irqchip/irq-bcm7120-l2.c @@ -220,6 +220,7 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn, { unsigned int clr = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; struct bcm7120_l2_intc_data *data; + struct platform_device *pdev; struct irq_chip_generic *gc; struct irq_chip_type *ct; int ret = 0; @@ -230,7 +231,13 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn, if (!data) return -ENOMEM; - data->num_parent_irqs = of_irq_count(dn); + pdev = of_find_device_by_node(dn); + if (!pdev) { + ret = -ENODEV; + goto out_free_data; + } + + data->num_parent_irqs = platform_irq_count(pdev); if (data->num_parent_irqs <= 0) { pr_err("invalid number of parent interrupts\n"); ret = -ENOMEM; @@ -329,6 +336,7 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn, if (data->map_base[idx]) iounmap(data->map_base[idx]); } +out_free_data: kfree(data); return ret; } @@ -347,8 +355,9 @@ static int __init bcm7120_l2_intc_probe_3380(struct device_node *dn, "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 Wed Oct 20 18:48:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573105 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 27849C433EF for ; Wed, 20 Oct 2021 18:57:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E46B6610D0 for ; Wed, 20 Oct 2021 18:57:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E46B6610D0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LY4Q00sZLX3QRTvo/lwIuTenkMggTQmiDELEy4+X+/4=; b=jV2E4O29mzYnVZ IDa4WYrtF/2SIy7X1FcnFvEYZUG5gxtV/sxZyU15SM83RDnlcMShH2Og+94LFyaqh0HJYdufZax0Z RkfYg6N6wnVm2DUnrlcbt6exQf5fqIoFsdodcNbeUCtEoX/7yw77sVpW/khJDsV/mwciLyQMIs+up rtWcWJBwkS0YYxAe1pJZdau+Nmhty0xk150Ro5m7nWOc4RGxOQByF1KP32NC1JFgAkKSItSvCVzhH wKA8Sr81ZOc8DV1AbKodH+9JH6sADWpZKbHhG18RPwZFIFlKoen1B7Djxyj2cmOCJQcVYjVivRn83 WcM6q6LhaFGPDXrmapzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGkK-005YVX-RK; Wed, 20 Oct 2021 18:55:30 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfk-005W1B-La for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:46 +0000 Received: by mail-pj1-x1031.google.com with SMTP id t5-20020a17090a4e4500b001a0a284fcc2so1221496pjl.2 for ; Wed, 20 Oct 2021 11:50: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=5ALk99V/yV50Q7B1PyIb1+nfNEsL1ZZBgIrsEIIgD/g=; b=TAuk2jn374g9wQdgNFuqPGwkxrWxFwhaHobnKd4lOgCPnec6v0XmtlgNe6rlQtyrdC 2ftXib02gb7DZIk2M8PtapR9HLef3oOd0IJEHFucGGNPChuT/p2hhPOXgjZFTOWomB1g B1AVSCTyz6rbXcabR45cOzgctfVPsEl7Q28NhWmivYdLRkGgQDzk472K8FZX2NIQ1GQU Ev0kNPPo2OgF4xlEKpQIjZ7D1eKiNhrqdrNhdccacaSvasTLHVsV9feLR+EtE7AH59VA 1+XCdD2p1sauaUalTcGGQJWHKs+YT+RGf9l9vT6dK/FKWxIz+FHM2YXaObLMBlzllQ1B CIpA== 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=GqtWPPJpG6Mm3AGf8zV8fLCRK8FjoObNVT2v9wgdg5CnaVxzHxDXe1VEEP+SvOMQKr 4lPbmP6bDHXDLGaQFKVNUkivUf0ssig0Ng0aAfpM3ZxYI8eoJwH2OcfVPjalO7oChw9x q2WoR31T7tZvVASbtoWSCoq12FXrX+cYlcCfT5HP0KiGJuNzcx5HSZU+1onlDzppVygR qsObNPgPHUFP7wjelg/9Z+niWNxiBm97JGFifDoyd0vpNXgnfLnCt2oSxwcDrleYRmLz Q/F+SppJdF0RJ1H9Z05CZtScsRyQA5oJKfq5KjqSvggmr2EchjJ/zDZwagElNp70IdH+ fpCQ== X-Gm-Message-State: AOAM533WWtM++x/UMyYf+A06ZSaduZdeb6BabniSDHsBVqodnjd8KmDc RES9/5O+TKaudo3LsGN9ukc= X-Google-Smtp-Source: ABdhPJySfx8R9v6bRAeT2LsmOi1+1HftWXhsN+IeBm1YO/wLGEke5Ai/qDLYTcNwiRN0z4E4kH3hcQ== X-Received: by 2002:a17:902:d718:b0:13d:e2ec:1741 with SMTP id w24-20020a170902d71800b0013de2ec1741mr843381ply.38.1634755843773; Wed, 20 Oct 2021 11:50:43 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50:43 -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 v6 11/13] arm64: broadcom: Removed forced select of interrupt controllers Date: Wed, 20 Oct 2021 11:48:57 -0700 Message-Id: <20211020184859.2705451-12-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115044_751538_E4405940 X-CRM114-Status: GOOD ( 13.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573113 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 AE275C433EF for ; Wed, 20 Oct 2021 18:58:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E86161183 for ; Wed, 20 Oct 2021 18:58:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6E86161183 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IjtZu2/XIwIRVQMS5fIHdj8UCLdos7xLH5lYbfZ9fJA=; b=cMllk/HTt7vzYH nZv6204xqQqkXZMag2hGKW4O1jLmtpv6brynrKbTeXx3RxsC0scNSXNFJqJDQcSPTunmNwlSEX6WV 3a+zlx0KD9o+q56DAzQCCksSH8gLWP0iml83NEwG26pAH9ypC5EErlzuMh/hok3G3SH57E3xtc9nz n6xlmYFCsiI/DFQI0x92k110ojmrUtOMFL56Q1qsgah5+H6jEIMH5KtoQ/wCHfDJBhQjpsiTb9aWN 9vhiqUyncdTcEBm9QDERO2r7CIQwlFP6hO4AjhunBzX/ryDL+N+AybjZt/F9JIQik+7NkybHmbY0F Z90a2lxPdlUe3QcthG7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGlu-005Z8h-Dy; Wed, 20 Oct 2021 18:57:07 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfm-005W2P-76 for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:47 +0000 Received: by mail-pf1-x429.google.com with SMTP id d9so3742531pfl.6 for ; Wed, 20 Oct 2021 11:50: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=cvv2iZxij6FWrFEEKivGkcFAPGtCwuGKeJ0S/lB+6EU=; b=qohmFo7HSTuJiAuIg8jC9flJcI1Tz+q6TCYy7uEX1gXUDQ9oekWlTqYalK8iWW+mbk MT8LiO+KjgBDe7X2n6d5Zxa2thuN2px4LR/56XUbp3kkFs8AWOqvdx2h50r62Z3fvyvl MLop1X59Rk4uXj5ceRKB9legRu4YYKtqE50RTblCBy5ARZd/JKKra7VppZDKjvi5Ot/R AsMQX6Pg1fc2uLmopGB8v6jS38aB7B38NSgSMYHfXMV43dAOZmLtVGiZE8AAMnnOtggm MgJdPYPEhnUSAtN5sppUN+A9Q4imzs4EFaQJSGAY9wiFTrhu1Y7tN3qGszVBlTuTdrUO /uWg== 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=2tziB3NOY3NUitJSM/qdUCRW0HBfgCOSiZteQrHyKQhJDs3eKG5xPyUi9YjEKn1bmn JUkL3wHRYNqgkwmvG4VLKF93Dn7AMhuaNl8gwxLWjZTxmef7sjCuct+xZuYw+WjRZooV XC3XdPFHZXzHMJQq3ml/s80dzD2cRBdRm31TspJf/Xv5udp8O4oGpX81CMUR5S3Qdu2/ 9uB6Y3UvWwHOG5ltM8ViQ8JTSazKy+/d3sYTinVWf83UejclKPSLIXm7KccGq+oHam/6 xC6JkhI320Xtu7iw7gmlhVVRrUAdjzBjvWn0f25R6lItr0MqYLCbrmsbRsXra+Y1uDfs rHyw== X-Gm-Message-State: AOAM5320hxSAqIlSaFc5i78s8d+fIvwNO4C9QWFMtnNIIZmk54JNLThP 9ySuDD/ZE6sNbgIAzM9BtTQ= X-Google-Smtp-Source: ABdhPJyq0DSVNz71EBMdhA5txyFDLR2UKlGDUpXfcZZbCJzNwUZ45gyW393A5LrdSIZpv8Cpckh+bw== X-Received: by 2002:a05:6a00:d63:b0:44d:186d:c4c0 with SMTP id n35-20020a056a000d6300b0044d186dc4c0mr608662pfv.47.1634755845385; Wed, 20 Oct 2021 11:50:45 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50: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 v6 12/13] ARM: bcm: Removed forced select of interrupt controllers Date: Wed, 20 Oct 2021 11:48:58 -0700 Message-Id: <20211020184859.2705451-13-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115046_298328_86B13C05 X-CRM114-Status: GOOD ( 13.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Wed Oct 20 18:48:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12573115 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 32274C433EF for ; Wed, 20 Oct 2021 18:59:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED29E61183 for ; Wed, 20 Oct 2021 18:59:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ED29E61183 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yEwxeIQc+UU+L7yj3eECEoI06gerT965sLE+23vm7OY=; b=ZwpDO+1combfWJ aeOt9RMxDHHxrBxVDipjU3Q5OTOJmXDvGMIt6E14y1wakn4i6Vco+qPe5EAnhciUsD5JBOvrZYJoT cbpPaP1iIhqTm7LAlk/WYuSNyUpq1rlCYEGkQVCY4EZKFRtZbt6YGW5ARdhh6r4GK01TuyfGPKYj9 NDVMWNqp8MeRapwsVRTrjLox5ErUNjGNQfO2zDzffeewTXDVC/ZjWy2vgQurZROtnFwTWld7jDg1j NXzLyfyxQt83NC1MuWAuk59YKDuXLFyuZH58QQfFlT2q2rxcaWhjsRlQM6g1eDBBKodWGztZtF7MW DXWyF67HWAzzha634RRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGmh-005ZTk-Cn; Wed, 20 Oct 2021 18:57:56 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdGfr-005W39-2X for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 18:50:52 +0000 Received: by mail-pf1-x42b.google.com with SMTP id c29so3741339pfp.2 for ; Wed, 20 Oct 2021 11:50: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=2G1kdri23kWnlj1enPufIZN1leyxpMasJ2EyRU0acfw=; b=GwRLeZAgQyhWzXBve39ZZ8disRmnwjqnXMZrtjJMr8p4bDJiS2ak5weMfmJWh4MMF1 cq1/VRmUkqMvbTD+bm9Xg5RJbYvwNbf/h5GWAXSuTwfUG9m3yZqFj3kLughJlaEwbCbq WFX0GhuK3476jKxhv3jTzDHrHCShNSSIOsFVIF9Ndy3E6htLHlNHaieXIAa7pZXzOu9h 69dpFXdbwAua8TZBAHkSUtNyZPHrdjbLLUeZnFIYjQ6fQCZpPWLg3mSMikvXWH/LX7pd NYI+WYr37cWoONmgtB2i+Am1E6mVnAcBpx7SXwWfVvOmXo2YcV4MxuNwZwMpskTePTFG RaKw== 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=wDNoQD7X6/I99KEI/qBAXRMenbWWg9khws2nQGSDe4nOhv+0qPiSycVgkqjRjS83ZA TjEmrOeSi0yS4Z4+zvO4OyDE/DeilazUg8ERtzheS/IWjjAX2GXPgtuuNuZD3GkB7fh7 2s4ZmHm7ERMrtE8xhm+WqXoz92FXW9kKKaSwjW80RpZvRrW8JAPW7zws9QMo5+YFUcQq bXJCxsCgMlJbKtsY1MI6HEby7CdW+nu904NsOc18Vy4lg0HP+co430G71STKFPNFikFp W8I9GVKPN0eFNhqNiHXgPYpgSp5U9gDUSLXPZ2auJmcXOg5x08z31fcXUFBU5X7kaWPK MsUA== X-Gm-Message-State: AOAM5307QGLppXAleSZar8wKnSoYbx25NaaBGxmdxpts5DO8u+JfSVBS T3m5+rkefdVD0fVkGwWhQ6dLTPjWFlo= X-Google-Smtp-Source: ABdhPJzTBKlnu/SAxrtzo9ELZ3GXRd222mBb2VFjfNED53MAdRSpGCiwjE3SxrYBR4O4pWV+SP/xyg== X-Received: by 2002:a63:8c19:: with SMTP id m25mr794397pgd.164.1634755846750; Wed, 20 Oct 2021 11:50:46 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o127sm3267863pfb.216.2021.10.20.11.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 11:50: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 v6 13/13] irqchip: Fix kernel-doc parameter typo for IRQCHIP_DECLARE Date: Wed, 20 Oct 2021 11:48:59 -0700 Message-Id: <20211020184859.2705451-14-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211020184859.2705451-1-f.fainelli@gmail.com> References: <20211020184859.2705451-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_115051_152413_B947D4C1 X-CRM114-Status: GOOD ( 15.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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)