From patchwork Tue Sep 28 18:21:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523487 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 DE471C433F5 for ; Tue, 28 Sep 2021 18:25:47 +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 B18CB61371 for ; Tue, 28 Sep 2021 18:25:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B18CB61371 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=GFTOCqXZ0ZXYH09bSP9Q6xGFHnT3zTSsLAUrH8EMfSs=; b=GoR5aAEDgyVRDa L9F8KdDQHSaK2CX0eRq5s1YEz4iQbpiKkHEdYXxo28yE/1kCdfx1dd1jMifFQY59HUWuN4TpY/rfz 2Wh8tBEOn2id0deXXC3zBplvxLqmmsabdZeX7t3xa3RP4xzG57RUMhWv+/sSRJwcbC+dj90kTxVmz KA6kUzNaBZ/oCTSn+px0TdIorKc0r88gpuAGwt9EuqUknhGJJISd+KErjTl/NxQ99uh4wdnnTFhCn C4ly9Q4spYYPaHz9jjVL4PRmZkohu9PvlJyAEzK1B7XcsvNaU1Ro6GKf48FR0FbzCfiE5vuMebVKz F1JFdzcSgGFCXE+2w/EA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkT-008ODC-Oi; Tue, 28 Sep 2021 18:22:37 +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 1mVHkG-008O8X-3D for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:25 +0000 Received: by mail-pf1-x42b.google.com with SMTP id w14so19648209pfu.2 for ; Tue, 28 Sep 2021 11:22:23 -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=GyK23hCAo9rrYB5DytAMn+XEn6byxlXYhtxgWpFOWzk=; b=Hoy4HcV97uiRKlrKZ8mLkU5PvdCJfz+bpA0IIx93/v2A/84zOx3g9XBn0knqgZ36js Hq/B3hunA5byE1eIX67a122f9V6A3fRqAhPvMIecJt5jPG43buORW+JCAMBSS6Yagyu2 Oc3/qsqo6qoRyA7J8Q4CYozEslv8uBpaMAfBYT+9rJP3S/Z5DG9vkjte85EEVq0Varov PlagZ25JzmaloPZugg6nlLdfOGX3Y8RdAQZMHTdBsCeBkzlkJAMQsjUNQHcC66nRj/aO XugN6AIxQUDtYH2EMQAJcu2k4HhcZz6TxPW4SgD4U8qTgIaDXGobqZZO5NX/scr391u0 pjXg== 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=GyK23hCAo9rrYB5DytAMn+XEn6byxlXYhtxgWpFOWzk=; b=c4ZM2QWJ7N2tzDMLwOxmcjvQE8lG6MCCLjbqj2eTHhwNCNHi2+oza1dnFLPPAMTRfn TUY7mi/cIHPp84QoPxdojH7IypJnd27N/6TY1iZS1PP3j/mPVWsCk0k0h63chhjh8dfR rOrb0Ba7f7Y7LIXIBa5DF9n+j1KTJmWcz2jp1rftc+ix60WyKfurn1zF/UmpfvQaxPXp hafQAjTgQNKFshK2KAi1cYH1VFy2zE5s0H+0wMtraOcxbc3X5jTsb232Yv4v0WZ+1j5l NUQ3mBhBAynkRHmA2E+XOUC50C9OIKKTZUEkldj3Qo2beaQ7d7nyIaP0HH9E4ZIJP2wk DWWQ== X-Gm-Message-State: AOAM53030E6bKaVXafPaHuppHZUpWQs6kd6f+jNyp6cQxJ6i6SVggsjS vF0MwcE3Q8XF/6EPrN7JmDw= X-Google-Smtp-Source: ABdhPJxyxge4NVt6pGsy8e42QLleQv658qttZI6/lvxewzvQ6eD3yNOrWrjwbU0WyM3FBqN1mN1KJA== X-Received: by 2002:a63:9d0d:: with SMTP id i13mr5800357pgd.117.1632853342879; Tue, 28 Sep 2021 11:22:22 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22:22 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Thomas Gleixner , 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 , 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 v3 01/14] MIPS: BMIPS: Remove use of irq_cpu_offline Date: Tue, 28 Sep 2021 11:21:26 -0700 Message-Id: <20210928182139.652896-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112224_173121_1C463961 X-CRM114-Status: GOOD ( 17.43 ) 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 Signed-off-by: Florian Fainelli Acked-by: Thomas Bogendoerfer --- 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 Tue Sep 28 18:21:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523491 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 AC070C433EF for ; Tue, 28 Sep 2021 18:26:10 +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 7B0906137E for ; Tue, 28 Sep 2021 18:26:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7B0906137E 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=xdmZqq2D+aHbIW 0gupKCAiTn4yo7JfIXUutwa/hCuG4zQxcohjxJvRROREB2cU5unYCerj+Zbi0TnyOUKiuu8bFolfk g2UPxirf++Iy1drI4c8DoxjzY6ZCDmYri+VISLDpJgZoVaS4OvnZS1o90cIK6JiwZc0dOtdTQkPHd RoFruRMHUM+YWOL3Tk/UzfBlCSegUr6NQa3ylX/GUcCkFu3TGF59DQ2s1L4Qv56DoQzzEi3/JXqgy Dcg9jC/itWHVERat6rskaBQTUCdwRY6gxlneAcHVxgNjQ6N0UiOx6HYYQ7QddYVtbkEUXD4GkGhXh kJjo//tpYR2t9BzUcZGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHke-008OGc-Co; Tue, 28 Sep 2021 18:22:48 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkH-008O8x-I1 for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:26 +0000 Received: by mail-pg1-x52e.google.com with SMTP id x191so15160023pgd.9 for ; Tue, 28 Sep 2021 11:22:24 -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=YfTvKPMV9bMEJzY5iInORnexx/3hegz8PI3DEcB0pgPFaINO/RNHFnPjSryI+E57GO MyFTELurYhdgmIuVtrrTVeldLitYMvKwMESeCojCrKycjhi8vGLm8PZgSUhGeznN3JR1 bza7N91AlrXdoBa/8yC5N5VROau9/Y4fx9WnNIV7JOTC+eEaj+74ozgOzm+qAY2AdNo3 ueOXz/VmnWQNXkiQY3rTg0Fwmffn4r5cpMgPo6JNsS0shoD48F3VGqKOgNN923CkYf3O t+kqvH6aFEdXDkq1+B+CJu/KaHLxXGthwb9bmvYYL6Hobb0WIyPPBwCWyH0FUzK6pwCp /2Jg== 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=vAnj8iBluJo2d3OksrL5cbQScWN+0t4m7qdX8N0ci1hbC+oWOCw8MpQ3n9ViV/DzJ/ MuqdC1XGTOkAPKPCFEuRtKKeApnzraNgTyvKQx56dg5wAdCYE2JrW47VlaehXff4LVA0 fVKSzl+lSBU8y4Yz6y17lRFpTLJLv5y+e0fyRsscJ5K7PnhSUBNVnQoaE8SQyDbAmxYO l8V56dbbnO73J+hQnxst9SmLsSdcOjGEgZi+lRbVMzGAgu4tEmO1lam7S4lR6wxkEI/e PrdCXNrGbzSoilPLeyiW6yO2pNJl6IUwawi5AgT1nd1EnREEOdof0+01wducK/YCDVBi 6ZVA== X-Gm-Message-State: AOAM531Zw+MA9VA9bFn41ZVcelKAhQ97cQ6w9ukEtcrfyYDakDY2cMaG dIgvEdysuhovoDlqIstDT+s= X-Google-Smtp-Source: ABdhPJzBkkkTfPaj6nkEz7iWLe04W8uwPzujCOo5VdzxnWQ+PdGxbj9GhnDWDX8j1UiqMe9Iw1umqg== X-Received: by 2002:a65:448a:: with SMTP id l10mr5712298pgq.313.1632853344389; Tue, 28 Sep 2021 11:22:24 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22:23 -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 v3 02/14] irqchip/irq-bcm7038-l1: Remove .irq_cpu_offline() Date: Tue, 28 Sep 2021 11:21:27 -0700 Message-Id: <20210928182139.652896-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112225_618497_142F4FDB X-CRM114-Status: GOOD ( 16.61 ) 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 Tue Sep 28 18:21:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523495 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 89B01C433F5 for ; Tue, 28 Sep 2021 18:26:25 +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 5A6FB61381 for ; Tue, 28 Sep 2021 18:26:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5A6FB61381 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=JSwnstlWhbMDZG 3c4hVIU0UJ/Lx1LB6QCRDrUxVbFWHBjk2vM+sqToSmt9GvODn/uszp8ibhyKARuFKrZ9wsVM/qIl8 bFwXXJ7HzObTRGd/ii5BUw6cATw/dSart1p2z6rSE7gUTxd52a73Hp3f7PopcpEco8pJ4ipT/50ui IVBrE5tQ1cL4csRrL3Vh30fM4MO1RSVE3YhnXzKicJFQ7INgsp8297pVQCifN+uKVTexFY+AptVWk UC9Aoaecs+HC/P1vgLCFziilpemByueUhJ4DNjTveOXYZpjo6HB8zxSsSbV8tZpRjg0OWlHhwCctX dSAoyRK7MgftzfqyT+6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHko-008OIH-Qs; Tue, 28 Sep 2021 18:22:59 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkJ-008O9Y-1K for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:28 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 75so5707457pga.3 for ; Tue, 28 Sep 2021 11:22:26 -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=e2HJ3c6ZwWUFLdevBMc1GkHSS88vwShLGGfOz/pbGGDRcNXpXWeNIxdt+84S8LZuLi jtUY/y/e52uKXENcXcK55HHN+MaGQ2/vGbLiuWp21FdiogwKKk8aC7XoXAKlLeY//sid yLL6LEGsYXE21szIxif2OOIB/qhfKUQSUAWTskCrG+PZSxPj3oiGl2vXE6vA2ov98buj rHowgod9EL52ADB0YjUzw1/XK1G+z3ktB5/H5/u0qlwDkqcCDhaec5DZoLO+ATMCsRZH z+IXaCe+o+TbPvy6Hk0xhJzq4PUcRj7QNG9T+5WP8PQ3qyINftNO+t8cKQWpUPabbsg3 5jIg== 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=XD0X7Mj8QyoOvNuVsYmlXBEwZTL6OlU/3Qbv7KVqrIfQD/0DVM96Cseo1YlgiicVGa FgFaENj8Am1kF+/c4f7zBZ32cpdOOPvV2EVcbSY5Qod5mo5XcjpWGJsCo0J4JhVJt19o EyMtCxTpnsk/wgOA9JpQGRTVnH58p9DuXAbTLPa9F9IRGM+pBpCF7NIsSq5JKOGpHTeU 7idPkIt2daplG3ANFPN2+rlseCL9hZSx5o3OMr3037JeFv+aBZWnKIIuxsPwhPSU6tbU hdR2KSnl8sCj2irjXpAN3MKjN7GffcB2JZ1sgC/6r2OyM14NEs9JaeCYq80I62Iff3MB GRKw== X-Gm-Message-State: AOAM530xhbdaDBiD2UJW5bUaO53d52o0oO4kG/xSQ2PJkE2tS14r0HY/ OAF1RYing6tX4kk8jXGYznQ= X-Google-Smtp-Source: ABdhPJzzSkYVoZXOkse0RijrGCPDHq4DWBO0lF4oSKo1mMeB4ZYLTmF2x0/q85KsvpG2ZNGSLmLZ0A== X-Received: by 2002:aa7:989e:0:b0:44b:2d81:8510 with SMTP id r30-20020aa7989e000000b0044b2d818510mr6929389pfl.55.1632853345920; Tue, 28 Sep 2021 11:22:25 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22:25 -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 v3 03/14] irqchip/irq-bcm7038-l1: Use irq_get_irq_data() Date: Tue, 28 Sep 2021 11:21:28 -0700 Message-Id: <20210928182139.652896-4-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112227_122656_BB1DDE71 X-CRM114-Status: GOOD ( 17.44 ) 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 Tue Sep 28 18:21:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523483 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 9CD43C433EF for ; Tue, 28 Sep 2021 18:25:01 +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 66E9B61371 for ; Tue, 28 Sep 2021 18:25:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 66E9B61371 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=ZwXTaglIk9IGRQ 3nu4KUzdQHKJBrSMPgh3b+CPT9cVb5zMHrhaw5oWlNu65JZSqak6aHJDuDAyRak9ENN6OdZMmSKEz alz9cwW36o47NIEzOc9zLGCGZ56xR12lF89/vB/GM7eJQs7lVZ8qGDCTH++2EDHpk2vMUT4tjKdt4 02J1o8xvErZmPsKPzSVY6CTp6aMQKfvobFmu2Osu5xyVp77lUPC7CoJi+QSlo7D70ns4kEcWVay3N pbfeMpyFhXXJsGj5mQer/HKHOr+UaoQtSL1Em9/t4ECkULsTtN8BFiQxgLPXcou5nGL+3yUSuTjsq ezJtktNUwtvWO0RK6ZpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHl1-008OLW-IC; Tue, 28 Sep 2021 18:23:12 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkK-008OAI-Hk for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:29 +0000 Received: by mail-pf1-x42e.google.com with SMTP id m26so19648261pff.3 for ; Tue, 28 Sep 2021 11:22:27 -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=DJQskZZ4po/z5W282K8NSiY/GLTaICYDm+aMHSuEiDYSmbTB3BATU5QOsexPRVblZh ZCJgXBVB4g65DDxrBtUJwnwXNuxhJ6KB6QI4d0p6h0FAxBWsp1su4g9ZQhZIf1fpOVVU kv+I7qlVpFsFnm1ITCr/04viuJxmu7RlnLOepmkaAIO4oTlIumxl3mwm0io75Rb8Ttcn 7W6BvZgg8QvPj2haenV1fq3yfNoYDmA5IR1ttIuqBx5YOtWkC4KJv5fGzR6ClxKoIIFS 3DdZPprqHsbT57s9YcLlZiqUIH1qDgz2soxZGTjlcQ4870QDuuBg6E0CibmOHty19GM7 qNFw== 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=CapIaGRHP3ARh5BZu5o5eT+icDbRLkl3eC080fgcbvr/DzcSwtuv/GvhqhW7LkyWFE yQjGtGGkc7KKD1ty5CwnnUTwwJUw3Ex+TnHza3glfttZi3jgyiemKIz38VGFciNtmc/L sX4qYy3DuA/U9PtHDtbdYNuAZ77IsfDiVjZiLLm9oO+/GH1kBY1Yov1+8VR+eNfszOvN lYfFfeg9JKUsD+B6fFs7YiazHBH9mmS+Y+BRqfW+BUTA4H4r6EyYC1o2PJawSWGOPRQF mugDVLy+f1D06+RQfNuiStEaAWmyT37AlQeWw4X8TnmF181wsnLOf/ljcPry2a3VZRm9 +ggg== X-Gm-Message-State: AOAM53110EzkMt8/QWmCIVZwZkOhK+hqlc4FGRLRKcbVt1EvT0w+90vH 1SrYA4dhMbEta7oY2G95EdA= X-Google-Smtp-Source: ABdhPJwU+pmz/u0j54qGZGw+pklmbp0pUmxUzsiRS9pYuoRENNmRa1Na8U3PgjRc2FmlvaFYXVHf7g== X-Received: by 2002:a63:f80a:: with SMTP id n10mr5773602pgh.303.1632853347435; Tue, 28 Sep 2021 11:22:27 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22:27 -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 v3 04/14] irqchip/irq-bcm7038-l1: Gate use of CPU logical map to MIPS Date: Tue, 28 Sep 2021 11:21:29 -0700 Message-Id: <20210928182139.652896-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112228_614237_7BB41D82 X-CRM114-Status: GOOD ( 19.39 ) 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 Tue Sep 28 18:21:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523485 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 99584C433FE for ; Tue, 28 Sep 2021 18:25: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 6DB1C61378 for ; Tue, 28 Sep 2021 18:25:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6DB1C61378 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=gRRJVq8ZfIgvK9 yVA5J6KujYZju0pi9OgTjuWc6zJh3et3TzNEvJ5ugS8EQoOzlrkfPnvqDLVKRrks0x4t5MCgORQRd G72XdtuKDyYHtQPlo70ZE1XKfijCxEcPMucHfSKPz0PMEzSjj6AtjDFTLPw6Mm26O9E8AYuh408ZP LdnfLGUrGbbCgZ7elTXT0dFvgj6bKrUni0d9VOMFhfjkbyDVuT91OdxysAlGNHfhx+QKYX3rIzpph LjJmPu5HzPMt4Mahpgr10MkxHYVodrAe3DDdU4C1N/opnWQmwMKM3+u6KFzsQnou5mtBT1eO567Cf EvUPqcLGm1ROOBEy+NVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHlU-008OZ2-5b; Tue, 28 Sep 2021 18:23:41 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkM-008OAu-E0 for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:31 +0000 Received: by mail-pl1-x62a.google.com with SMTP id x8so11953372plv.8 for ; Tue, 28 Sep 2021 11:22:29 -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=qD8YIE+BkdzAFNGOB7KHL+DYnDRu1+7sEmigspq7FVo8oXRZHDeywVsv8gnhUacnYN LVXAUfmAQV07f3AfPa731x2WzupM6SNCWPEhxzT3e9qN/mWvkS7hxhfcFk6KNroQckS3 buLAUKdJsdKP7HORWonhsRUn253xhugzeZKkaE1hKVeOnIhVoKAGkjhHqlC43whRYw+4 NHethsn+Ux7i/6ik+0dItg11IzTWTO2tU+hrSGiu+tFTkSqpogA0TxmnIw51xzAiJQE5 ScXEEf5W03m2dFpijKk8V2/QIAQdBDIAKDhX9Jhuoe9JLcqb4BMwYccOP9gYc2PSWF8A zONw== 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=dpD8yRBMVu2hU4EA/8Jwqm8gBGfb/75uQGImLCGo44DOGl2Uxy+uFLfm9ItdkrrfJc D7YzcNvyfVdEKuZRrgnZvFvHbs1+vYEo/Vx1+B1Fs8pTzda4DKvlz9gaKh17a8ecSS6f AoQ9yBHnUWfG8m11WcsBSrh/SDG6KhrMtcAv/93Hap7KwBvtLI/KXd3qPZMXClydB8Qa LmT7jsgDsau6sCDHgJasyVCWY4xWz2plWDR/3xHnbJfhg5ayIqtzMutHw9pC10ZLudXe VD31aHrAR06O0afi0eJJrWvTsxWoaEuGU79QRHI+y+YQs7G7t7AJ9bFL8+LrghJtAeZt kPOQ== X-Gm-Message-State: AOAM5308/7EMYgFzIj1Ju4Qcbbd2Rejz5a11CMAikPcLCzWiGEisLIBr yinflN32qnIYqWzK9dCOgqs= X-Google-Smtp-Source: ABdhPJy/pQQ7Mj+GhyymDTLMDxeMtULxslY4O2cr9dQbQ39uecMIk8qCz6TsUHCvi/ylRxXjZrH3Wg== X-Received: by 2002:a17:903:22ce:b0:13b:9a00:f090 with SMTP id y14-20020a17090322ce00b0013b9a00f090mr6524626plg.11.1632853349182; Tue, 28 Sep 2021 11:22:29 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22:28 -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 v3 05/14] irqchip/irq-bcm7038-l1: Restrict affinity setting to MIPS Date: Tue, 28 Sep 2021 11:21:30 -0700 Message-Id: <20210928182139.652896-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112230_497491_6C9F281B X-CRM114-Status: GOOD ( 18.91 ) 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 Tue Sep 28 18:21:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523493 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 04801C433FE for ; Tue, 28 Sep 2021 18:26:12 +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 CA2C06137E for ; Tue, 28 Sep 2021 18:26:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CA2C06137E 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=4I6cGLSTyODy2c wgkId9j0a3AU1n3Tx9/CfaRwU6VBf5IJgs724c8zq1tphtRHIj0uYXTfn4eXGl4PlAmV0CBLQGyl1 eB8uX+ZHa7wXSNrmt34sbZUBdEfgU0uCPPKk/B/h2ubW4zJsgjQMMiMZ0zv8n/4zvRgh2g/AB3Uqo skSfKBkZeWWzAucULIpgSs2jm5T2156XKkzN6op4YdT3myIbHSv4oj07cR8UQH5nFNRH797Kzw33Z aj4laFhnlJjUwift8d4dOmV7fyowXDkNU3o9e85V2kLQwuyMYDgfP9Ydof3cICYjR6yTRAMDnms52 V0XncVv8P7zTOSk9MvIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHly-008Ono-OZ; Tue, 28 Sep 2021 18:24:11 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkN-008OBa-Mo for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:33 +0000 Received: by mail-pj1-x1034.google.com with SMTP id k23so15595726pji.0 for ; Tue, 28 Sep 2021 11:22: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=IqTvFkxEB42F4FY7x5fTTUp3BY0gcheCImqFREsoxYU=; b=kTsIT0G/KrDrPn3Onne9wHI4gnAg3lQlkwbjw7aa0F/HMPSOLZJa/XgGOqjP0TjzAF DAMbGwSd3v5ymTWI8TAmhNv+th60xRAfzESFUUuy/yiQzB5d8PlCveNViGKPzP+mADWV BManhIsK/G+AZd1IQOyXfLrb41jT9p+gNOOxsHH0bXM879O2/Fti2Ur77REqP3gZIpqA iP3YZgRpqKIbHeJtb/OpyBhCvGo8/ylIQ9n+vWolccnS58ZM1dXtlr8PvqtSvtCkv/oR kYIQ19Cu3NpDkjCR3x3iwrWgWj9imMsB4Qn8tvRT2mtrx8XSrv4dIAHYojorbvR7j7rK bm4g== 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=ZG8j2xC3ryIBOW0U4BKJEHsbppRiJUfSJb9/9kgjeYodDYqYq4VYiZayFX0UPyYb9j CW/eTLUjCxoer0KTDRgU6ez/aOLnHGuVzOAG3AS+IbQGx15k/4iHr7HMzc69vVml9FiQ QUj2VMM7dspCIZIbQeyAu4Ym1f+AjzIKvvzM1xYeev2g7Loy63EeTlZN7M0G4yjXYE8/ B/lSwttos2Lna1RQs+iuICHbaNtClsX8dkcZjyRuHnlgYYXZhBXhWAfeRevgbgCdK45z KC+f8A/PVRAg8dve3Qrjvj2bcV12eJ64CbYp2ZYu3mxYjDFkV6saPaLK46FzDX6vcwXn 8d1Q== X-Gm-Message-State: AOAM533hcPixCE5H8IH/nNizhlLNtaQEJTM9xPVpp9KqqSxFa7HncjYZ 5dertks084rDt7snfbXBIpU= X-Google-Smtp-Source: ABdhPJwix3fY+AASgKFQmC3akUcOB24p3w4BvdQVDgtUUJYIy85NIPLXbkNDpb+JhP9GBUaUeHdX1Q== X-Received: by 2002:a17:902:64d6:b0:13e:59fe:8124 with SMTP id y22-20020a17090264d600b0013e59fe8124mr710244pli.89.1632853350732; Tue, 28 Sep 2021 11:22:30 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22: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 v3 06/14] irqchip/irq-bcm7038-l1: Switch to IRQCHIP_PLATFORM_DRIVER Date: Tue, 28 Sep 2021 11:21:31 -0700 Message-Id: <20210928182139.652896-7-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112231_843239_A0DD216C X-CRM114-Status: GOOD ( 17.02 ) 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 Tue Sep 28 18:21:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523497 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 0F396C433F5 for ; Tue, 28 Sep 2021 18:26:39 +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 C6677613A6 for ; Tue, 28 Sep 2021 18:26:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C6677613A6 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=0EPbHC4149zFk+ UO6oB+CQRkupor4y0n1AlnqkcNsxQiNufVpPdDKM5a0EcWZljtBTTlilp1v1a0XgjVBehqjo8zYOa +mW1lWxUwJoB/4v2gVdcYJwMR48cRC4T1xyrbLoZ9aH5yQMQEcjxtMCdQkY7qjAHF3qZj8AlJo+4i k7tnTyYR2DkMm6+GMlHhtUaE3yK3yxaP5HB7fsBGdteTCg7YVkvFrmDlAYafX0mLAbWr7rk8OfCxR qPXIAd1FE7yeAi7/J6DvGn70AzJE/OrVvTGIem9T//b8b7/RZU2ITtphkqViHErJbAT/wv/9OX0eU myyuKr+otDQ00DZCJkYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHmQ-008P1I-AW; Tue, 28 Sep 2021 18:24:39 +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 1mVHkP-008OCG-CV for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:34 +0000 Received: by mail-pj1-x1031.google.com with SMTP id g13-20020a17090a3c8d00b00196286963b9so2327692pjc.3 for ; Tue, 28 Sep 2021 11:22: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=cLaNe7Oyl1seZD/HRHq9xGsMnTdlxwayLK+zY+0ZWyA=; b=GVf8JqVfE5tUe1+G4ZayP8tJOzI0A2eBH4uWjOE0sUIjzn97IhcmTXOeulmn9s3fPx LdHpslP3yN5v7bAojKruljU8KXtDuqP5otQXvmLNOlOGF36E+2QU2c75E/VCGLEFdloc sF40SIG6C+I6lP6NWjWotFUyThbdvdCNXZzNWmoWY/00nL0jWuQzbukSQuP3UkunrKr0 DZKl1bcay+2UYauuJ4wW28THfKtJEkGhiFgqHjLRUh8zQ9JuPC4hoepAMQsZuJ+jMGMn 1uVQQgCiwgHdPrPvzKhJLZsPnCwKcFBFbzbATAmR0U+EbA6aHdV5gi2F2q5vu5HzerYd u65A== 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=LYe3/I1qrJM3NkoPVMMTE2nmNf1QDRjfuehoO05L3c4gQZGToPGQZGiv1uiD7PaltW shLw4HUXWbHjOcMOEHhoVORVTLk8IYOd7evVATLXXNJ66FQOQwDk6v/o0jJCDSPMnq+L eVhQ6pHPywZeSTHfam+RvGQSismKERdxFbn2Qv4Nrw6M99HnvIAkTtj1HNJYboUDT2iz C6idAzvOAeG3vNs8Z2FPkCSOTlpSf5BTG/NBfMbFvdnrk1+chOvUhrXVh+u4MTtY9IJ4 p05u3QtYOH5e1c1hTEgSoi0YS/GEZW5NbBZLcrYH3X6nem74FZA1peAFFOYAGTMnqZM8 299g== X-Gm-Message-State: AOAM530honnzMjnxLKXaDtBiPmrAylxcOxvLQB9fnIgxA6DK3FIgCcBM budU2najiPqgrNkhXfLx0dA= X-Google-Smtp-Source: ABdhPJwawjQqhVLsl67lDh7giXS6Mayn2/vDXZUilYLKdi8lu5Gz15t03jvkk//eAdF1/CsPbRGWRA== X-Received: by 2002:a17:902:dad2:b0:13c:a6ce:faea with SMTP id q18-20020a170902dad200b0013ca6cefaeamr5977706plx.45.1632853352243; Tue, 28 Sep 2021 11:22:32 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22: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 v3 07/14] genirq: Export irq_gc_{unmask_enable, mask_disable}_reg Date: Tue, 28 Sep 2021 11:21:32 -0700 Message-Id: <20210928182139.652896-8-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112233_451979_895612EC X-CRM114-Status: GOOD ( 12.66 ) 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 Tue Sep 28 18:21:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523499 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 A206BC433F5 for ; Tue, 28 Sep 2021 18:27:10 +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 6E07D61368 for ; Tue, 28 Sep 2021 18:27:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6E07D61368 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=UTLvNwULIthALd yIjBcBC+Hqt3AONqsy0iXBNoPX2MUbG3+RMBp/WTr821A0P4cp932lGOYhWJTrX5nlnqsXu+baerN qPG50GXeGhCGO3T+6RyHoBJ6gjsiTBt2lIDAes/qT4gD4xTjDZYrh9PUd0JRkKS48Un7ufc8LLDkt JhtvDaRudpHmt6vKcMnQKlAOK9wUNNbrMunnYsyuyM4ruADB+e4DHR2f4tB4Okx9STcEAPUwrUqWO 4ggSihSALao+DPBzqas6TifoM1gBKvU1N87McEFM+jUuTWfSkVlJCnQMIFIH5KmGNjacNsRzEb2Bj BnQCafRXEhiByeQvFFKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHmy-008PJ9-Hi; Tue, 28 Sep 2021 18:25:13 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkR-008OCd-AO for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:36 +0000 Received: by mail-pl1-x62e.google.com with SMTP id y1so14761224plk.10 for ; Tue, 28 Sep 2021 11:22: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=9fJWAIDZMBnqyaJKloz+swm+vHzzjwQ8q/tXjCn73F0=; b=UXEXvsWOSOD9Rkz42uQQWztnY1ts7XJsOzEqnZCE2MckxsmUpkD60QeGaRYzm2USi/ cC0UKcT1jFejXeUXZvLgkXhLHL3BqVF8tAin6V38JlmX+W77dyCK7vryxfdKtY5BMCn9 vWQLajx33do8DgClL3taGH1kztupEaPHmrP3qusHga2Pwk5LFCnz2eDCBcQZJ+KY99+G hC6ECU4yzHZrcRcpSCZaV1U+kV+4dmnF+FzvZCgoKGsGC1fQvVGMizt2XjpzdzJstPEx ambD0C/fWfAcuSIf6o621SeMZMbZ3dhuVnXJ+vQqW5K4hiD9OLnyjGXzzk63R3/YcJdG 7umw== 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=FE35evHkA+ZfWX6YlTDuRFxhrQfOeJdkyLknCFID7elIYx1AphLjhbt8lZDm43a/7K 1af3OxFvWjcRW+lKPzEjfQhRab5C6dUB+UnLF+ZYarwO87ABvbaj2UROHDXhsH93Smac YK/QTQx2orDWquX2Z9g8/hGY9qlGJ+MRroJQP04qCBNXD4MtHx3gNAcA+a7rp3FP4dI1 QKbK0m/I7Jg3eGlkPExUU8wgT7PpSeugZ6J3n149cXFp7KZA0YbcxgqoJazsZ1b8DBJp VRBsramuns3ukPDuAjjRgxxeUBinRY5C5SHNHylvqy8VTkKyrzre2qIlM5GeJdnk6x8E JiHQ== X-Gm-Message-State: AOAM531Az5qNDg9ZK8LeIHXSrNDr7mAZJ2MruAwoy62KmLI9UqOGS1D4 51Yl0ae4+4zEuwNzx7I54sM= X-Google-Smtp-Source: ABdhPJxwCFI4xny9h2gbQUvj4yk92qILQ/9rV46CpfqykWaxaqOZ5IE439UtP0Y+KLfNPFTKxEBl3A== X-Received: by 2002:a17:90b:102:: with SMTP id p2mr1502507pjz.222.1632853354215; Tue, 28 Sep 2021 11:22:34 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22: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 v3 08/14] irqchip/irq-brcmstb-l2: Switch to IRQCHIP_PLATFORM_DRIVER Date: Tue, 28 Sep 2021 11:21:33 -0700 Message-Id: <20210928182139.652896-9-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112235_384150_5FDC026D X-CRM114-Status: GOOD ( 16.72 ) 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 Tue Sep 28 18:21:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523501 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 92C2DC433EF for ; Tue, 28 Sep 2021 18:27:51 +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 53042613A6 for ; Tue, 28 Sep 2021 18:27:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 53042613A6 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=2C48vHkw+4hko1sJXD7FI9tK2n6bZgAaWj9hkfhxc8o=; b=diCz4WThDiLnhx /qX6ilasv2TpwcngJGGQg1wJ4k2vBecwMAkdok/4UCyFDPmERqW6ISE9ngPuJ072lwZt3CMYlE3Oa Glcp49EAvFuhx3vsg/EeLOxub6SlCnaD3bOlNhlkoNrygVxCFyA5n0O7nQuCWObkm3MqS4JM/TBu7 52/cDwt6naQcIcqwaGoj0haAJR6HAHCKfTYOeYGEnRm3hv9fI9GZ7zkXsnr6Mx+l/5X0N9seSmxEW IiPvvvQor5QZh+sW9VGhnVvCSkxuOrGBDFIfk1Op/LwMmOcTZR3Ka1D2tzywWtslRIwKsUm3WTW5H Q8M3sSKoxoJWeyadas6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHnn-008PlR-LK; Tue, 28 Sep 2021 18:26:04 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkS-008OD7-SX for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:38 +0000 Received: by mail-pj1-x102d.google.com with SMTP id om12-20020a17090b3a8c00b0019eff43daf5so3493947pjb.4 for ; Tue, 28 Sep 2021 11:22: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=3QThqxTZ5uzX8g3SWHj4WUPibxza6P9n5f90ZfsEf6I=; b=MmGuTkaJ0F6u+7C//ugUwBLAcl24MNApoeX+TSLBrVHYBHQZk9M+cHCz5KQNfeFz7O zH3Fv+HZpAFyed+/YYn047pkbWXCVyxxti5zUZeiv5zZPG8EphAvixN/GPgQK5xV1bJf o4hSWKG9vF0nnikfqJB1WE24B/ChltSpqrRjLWo4kU9ojUmJ1gfM0n+GEFGQch89CRRJ F46MWu7Wr/tkUytzjt+3fZZkqdih/gYK/nm+xdC0Znqnln5vTEQacwFId4Q879djTOcM vI2aBZEjCoCyRuT5DO4MZHoWg0v1O4JHP14zaDCl9dwdcTJWROqFShzMBaXpFjpiK7Lm 5QlA== 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=3QThqxTZ5uzX8g3SWHj4WUPibxza6P9n5f90ZfsEf6I=; b=pDvCmFOoldO4nKuHf9qwEpMEbSAb6xII0FH+vAs8BBI+1dI3xVxsH/J7lGQWMGVMKG 23h7jzP9g8Ggc9dZkQkLp0M4IlDq+dGM1WM7A5MElGIjBR1eYBLsSbMjWvKJgU4n+d1D reuPEib3hWkiDmdg3U1AI95482K02sVs0aGJUpP2/0e69nrmGWF28cFJ1tQAamyNdYZF klbTaRgK5l5GHeGJy9aIioj/jePSk7pBCFMYC9rrMgnCXgcooQdx3NOrgLk29VNw77R9 0I+g+qFoHRs87aAGhVqdYodg60FRFnQCqGzVJb8w5kEvNjbiMLPtyK2eIussQqkAfsmg dzIw== X-Gm-Message-State: AOAM53381ajIXDTSB+QQt5rSKqenGgy9VJ7XoNdikAd5xbEV6fqRU4E8 5WClF7Nq0Psr+eaFPHZzDHwpClMmNMc= X-Google-Smtp-Source: ABdhPJx8tmBo/AWrmQZYNo1TqTWhR59dq84XAd8DRwqLZN6020NHT9iGw4RwDY26Wsrx+lOWDWHmRg== X-Received: by 2002:a17:902:9689:b0:138:d2ac:44f with SMTP id n9-20020a170902968900b00138d2ac044fmr6285282plp.85.1632853355713; Tue, 28 Sep 2021 11:22:35 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22: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 v3 09/14] irqchip: Provide platform_device to of_irq_init_cb_t Date: Tue, 28 Sep 2021 11:21:34 -0700 Message-Id: <20210928182139.652896-10-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112236_952279_1EA46C29 X-CRM114-Status: GOOD ( 18.71 ) 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 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. Signed-off-by: Florian Fainelli Reviewed-by: Rob Herring --- drivers/irqchip/irqchip.c | 2 +- drivers/of/irq.c | 2 +- include/linux/of_irq.h | 5 ++++- 3 files changed, 6 insertions(+), 3 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/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 Tue Sep 28 18:21:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523503 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 C5989C433F5 for ; Tue, 28 Sep 2021 18:28: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 873BC61368 for ; Tue, 28 Sep 2021 18:28:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 873BC61368 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=h1ZgLQF4TgreZh 3Duo+sLM92DgLudDvMwOsZBsYMlysbrbAI3xC0jJGy2qxjE11aUlFF1x7/Azbqj+Pk7t866gNZ2P4 KZrm9Am3pUGNkB6SfoqgV5W1EC/B95psDNBvwAkUW7ToQ9tGcHZh6ijlSN8tR8NN8IQpTQieciHRt pT5VHc6hEA6L9ZNPYd6NXfZz5pi1l8z2ZHOJaSSWcat9zX79dvKcUleslzRFVb2Q9J1Iz5nA6A9yq Ki2QKNrMhcT3Dpdd/2+4ErBzD4p9Z4Pnw+3ztN5xRT/nxEOUoSpY66Mlm4RqKm7Wmrn3Hv/anN1Ew ZagronVWd8JJMKeK1bSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHoh-008QFL-BC; Tue, 28 Sep 2021 18:27:00 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkU-008ODk-BX for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:39 +0000 Received: by mail-pj1-x102e.google.com with SMTP id k23-20020a17090a591700b001976d2db364so3507764pji.2 for ; Tue, 28 Sep 2021 11:22: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=HFON70fhXDszaD5v9yYPo/8gY6ecjeQthvGng5DXIkI=; b=TRNqeeyOc2dTMBpj/t/evLTt1xlZ+tgAwIGyAYXn5BI1VSehnIbS4fa+iwKmrLgHc/ Ym7MUpvJDUaRkx0b9C2gGSZc9Q5i2X1H+N7YIXftvnEF/vgXsPng6kbTzZR8cNGCBnPn kJ8DJgq8j9XEFG5UOhLsmtjhxrvNiLQ+ZThHDxhiBZxu6wXZH72azpxT4fcqNuoiUWDc ID0SBskB9VlY60tfxMggrQmEX+jnoAqy67Owsto3K+AJ9WwrOXlSdpWc5UI7VWCxRATf DfWcxGdYfxW6fcZlsqodmdCifLTpV75GHRr4vet2aurGJgPB+2tI9Pcw5w1KbppGNcWF GV8g== 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=4NrhHUxCSwuvultXWu4mk+0tGNFYnSGJF4e8qtyVVNH7neHaKQaL+44swJFxbKWzTg IPvE9qo64ijRmy//S3B7zsZDly3q/s5pMWuJQUrYIXeNMV0PvcgmXeDPOxbV/mDMrYWQ uvzpn24b/JnKUgC8aMkM7YwlJlqRDYMP+CMk+UuTi3FdSkvivvJRyQesLBI4G+Q9J5Zk kT4JqG2tP3y/dIur+GMfq98pNDMcPHWSFqGwaXmsCKRfW4CRCl7VPAwFNr7SLLlKOADX oc3IDMGL0HoOS/+Ug5R1swwL/d8f00m5s3LYPQsNBG4RZOTsH5htIpzBMCn/DzDUJT13 TBCg== X-Gm-Message-State: AOAM533tlN3l8JNgj1ipELWwIKBHr7hrmQUh5vT3XqK/UG2i+xQ2RiFV ax+UvkGGm2a7ByOQ5ZFL9LHkcz2yYS0= X-Google-Smtp-Source: ABdhPJxz0Dn+bupuDiWFHNrQF1YsxjDKqfDJ4ZXnS+pWTunA85l0/rfi+UZAKeK70Fr9OcQvsodYsw== X-Received: by 2002:a17:90a:f3d5:: with SMTP id ha21mr1467834pjb.93.1632853357239; Tue, 28 Sep 2021 11:22:37 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22: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 v3 10/14] genirq: Export irq_gc_noop() Date: Tue, 28 Sep 2021 11:21:35 -0700 Message-Id: <20210928182139.652896-11-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112238_431980_AAAF6680 X-CRM114-Status: GOOD ( 12.44 ) 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 Tue Sep 28 18:21:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523537 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 3A129C433EF for ; Tue, 28 Sep 2021 18:30:35 +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 E4744613A6 for ; Tue, 28 Sep 2021 18:30:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E4744613A6 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=6Mit3rxaLxBibsUkuwdhvLpDPKmT8un7Ku31iGk+h24=; b=mxvCVUKQlbsREK TmCXiUX28XI2drxa49ekl9dEbkKVE0bUycVX5jJ2umUOCMqErwF7ux+Ka3IXXttpGbAKzmci8vs3S E6nIjQLVDqpjeV39/k7pgh3HZsAmswVhsJP8NwGYfUtsIgxM6V4phIe7aQ2HJn8dVUlOJlwmdNYzg DTHq/Tbldax3XVnRMi19tObXZp5CFTNpjUI6/p/3pf0NEzCurZKKxzFENofYwalJtfRhgVLaJylPk fLxMwL/M+FSLR4iE0otFfhVahaa/E+UUa1l/k7jCjCYSViiXBTI2jywIUq9OvCtefkHnNiRJGVZy4 Ieo08yQdeibb4WlKKFOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHpK-008QUr-3u; Tue, 28 Sep 2021 18:27:38 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkV-008OEA-T2 for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:41 +0000 Received: by mail-pj1-x1033.google.com with SMTP id v19so15578078pjh.2 for ; Tue, 28 Sep 2021 11:22: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=T+nuZjtMi8lifdnlhi4/+fNb2Wj4qKRZZKIw/UMDjOI=; b=G+o2xUh8M8NkfU8NT07HPrClNmOIZMSfAVG7yNAY2y3Wn59GiAHNpo1x731Ch5MfSn v1ir4r+zbPIQb6DQmz+oRF2YqZBsUlEDnGap5ajhB5oDQEBgtB15J0TQPtlP8tK3rYLc EH1WsMHJHEheeQm64Wc9m/Al+D4ViluDEE6/+Ml5TT0GoMwr8hffKG5Pz300dWuhgzOt O7ZjQx1o5Ls9jeyMHLutPbp/0ETqenPDVP5yAzfw87GvqkNeT5MWDRhl1QsLG7qL4ogG cSu5R/Y5BO/TnBp+UDCof3QgErs1PLmD0sZEDpl5EzRhZEp1ygM/GCUNWarCKfmvin+5 e4Eg== 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=IFHKh3b0hz0vgRhrFtx7lHkhl/sxF4SFJ4yYjj3aBIbXat2qP4qIhdME/0cDUDowvV 63eVGOo/8ma2PJS5iWkdD/FeMNBWGLB1KbbF8rEuOCPBcJcPaiZKcNV0hJw1UOq64BUH Ivp0uaCIbSaeZ5IHdvkeJ7+HizEKuPoh7X+OGsz/tVGm5RN/TjImhZPeP+uPtdy5j4Et XuYULKo1pQ3lYMm2I76FZt55KtNfiLcp1tvciq3XryY9jBzxz1L7SuDrMDSSm8s7/Oxg nPAANDQet+F+TpfxFhn12331IXCUwLAoZfwirhAsEYUjZI456Mm+1MFOfMUCY4K4rPcs mhyg== X-Gm-Message-State: AOAM5327q6UnD9YwuBtKKLaRX+M5aUEsX/+/Gouc1ZYxvl+/ui++4lil ilOAWUnuft338t9ovcNsw98= X-Google-Smtp-Source: ABdhPJyK5lvwpIOD+t+3MtZZcxHZuqPusK5TwFvp3Y9TnVD2reoEB8HTRQ85YAUfTWG1t1tC4YWxZw== X-Received: by 2002:a17:902:6f01:b0:13b:7b8b:84a3 with SMTP id w1-20020a1709026f0100b0013b7b8b84a3mr6242105plk.40.1632853358738; Tue, 28 Sep 2021 11:22:38 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22: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 v3 11/14] irqchip/irq-bcm7120-l2: Switch to IRQCHIP_PLATFORM_DRIVER Date: Tue, 28 Sep 2021 11:21:36 -0700 Message-Id: <20210928182139.652896-12-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112239_963419_2926D287 X-CRM114-Status: GOOD ( 19.66 ) 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 | 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 Tue Sep 28 18:21:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523539 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 84E84C433FE for ; Tue, 28 Sep 2021 18:30: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 4D3C4613A6 for ; Tue, 28 Sep 2021 18:30:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4D3C4613A6 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=ufDUp1+7cdwykQ s/8m68seBM7NUvNsFM32z7m8XA9wYkmVromzVWWI4yFmgAhkN50wXHCaSDRIkauaKx5FWs+3S66VK R01lU8h5XAEPpcLjBfFJsCJ9JWKdODgHt9GU2oze21MFdNmyaQOBnuaQ+PtVMFockAk/mzVLgVXdO MovOk5CY6i2TNMiiQWHu+W8DtExM+yyD5kqViM0IBW4iTXMMeYU4tbaifjMlgFkPh8TY+9OXaCT4B 0prAnkmfbaEcgZNB+cYXFe7DgpNgGK0p2J7r7YVZRnQ+VnIs9zo9qkPzIFRU2D3tpqB17+KzSOa7G 1Fc+rZIxCuQbFMxi840A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHpv-008QkG-3Y; Tue, 28 Sep 2021 18:28:15 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkW-008OEY-Np for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:41 +0000 Received: by mail-pg1-x52f.google.com with SMTP id y186so35868pgd.0 for ; Tue, 28 Sep 2021 11:22: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=5ALk99V/yV50Q7B1PyIb1+nfNEsL1ZZBgIrsEIIgD/g=; b=lcMf2uYuDXr4vVi/DkRQdxje2Bq7Gu0PsejcNuYQcLHVGdyPFCeHeYr8L6kr0fRHvl c9+0cTNbjSD3cD5S7WZro2iyL0D4Sj3w9N22shviue+wctgbDTfwJ8QcQxTSbMXBKqPv 9ZWeWDfTWm+Bt3qN64hou0d8bjYSKCvLVUP0DKfbo3PG+4fwlxWYXGEEC3OsJWCCeKIR hUC0mD+gaJ6eRrqyOBtChQFSvSXCVVjH2cEo1O4e3JcTCMAV+f4y2kwNWKCUyU7Ywt84 QEXckRchPgeUZb9T8paxfgXibtP5z0f6rqWt56cmuSeccdqB1CCYMOA8rSawtM9FLwwd RtaQ== 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=8C+X94foqrdKmwwlhAc5ya9cR2YIX7Qp1LOMdiUMb0pFdhORtzP3R5okRbZkRIv30t cTh2AHASECfh+sSTT1xg/TS42aaGxO+xEPWfq9MQ8LhRBRaCXinsDSBf/IJKbyewtf4I FnFzwaXfkAD9xXOncMayOcdwUTJAxI1a+emHJR0zjXqbuemwjgI4+2NQXPgUa5e/Q1IJ cs6tYe4L8GjHGhjklm5sa0yJtY1JRcClK2p48jpPJCoypU5gzOW7Quo/xSo1eLD9CG/g LO9Cpr3oORvOpNTztc56QMubi0fo5KwI9wZi5Tqt77G8q3WSKNySz/nI77eO+HvZ3lom MvFQ== X-Gm-Message-State: AOAM530pIlM7XaSf+ozdFZNCSK98Sntz0Zn5u2DW/hXdDmprDD24IzqD WIj9e2bLqq0FmcJL2qOQfAQ= X-Google-Smtp-Source: ABdhPJzq2CeEoz1qAaLWTWoo4xYrAetR5aJdpAf3QfSgn+WmMio9ms/k07gYA2Fp0iV35vnwTB+3IA== X-Received: by 2002:aa7:82d0:0:b0:413:5e93:2f7a with SMTP id f16-20020aa782d0000000b004135e932f7amr6857004pfn.16.1632853360272; Tue, 28 Sep 2021 11:22:40 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22: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 v3 12/14] arm64: broadcom: Removed forced select of interrupt controllers Date: Tue, 28 Sep 2021 11:21:37 -0700 Message-Id: <20210928182139.652896-13-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112240_799801_7AD41E1F X-CRM114-Status: GOOD ( 14.04 ) 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 Tue Sep 28 18:21:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523541 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 0D419C433F5 for ; Tue, 28 Sep 2021 18:31:00 +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 CF1F1613A6 for ; Tue, 28 Sep 2021 18:30:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CF1F1613A6 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=h0Qo445/OGVYOP Doc6lPBArLFAA2nav45CnoHbBllzPeGzpq6IitjRuV0oaBmIrszhCm3TrKsXche1Ioy/v/79iZivn kStr701/oVPOUsJXnz04h63Y617KVCAKveMYwe/jx38oU80ipP6ReNqaux2lJd+ZvsDW70+6Me8vf DQNNxmFCKoKyBsip9NomuO5Iug93zIC84CpNrMZHp1XFh9bKmvCrh/WOdurL+b+oTGO+kR7/0LuYB JIdO2w8SDD3xbPZYBRn7fAxZz+4FvZVGzzkqPWj71TWuvJLjYXCJAhzqkYCPs6s6+yIgEc1nXRk5S CCwUw+tzGDiBRWahVRSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHqe-008R2B-Jc; Tue, 28 Sep 2021 18:29:01 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkY-008OEy-Tm for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:44 +0000 Received: by mail-pf1-x430.google.com with SMTP id m26so19648756pff.3 for ; Tue, 28 Sep 2021 11:22: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=cvv2iZxij6FWrFEEKivGkcFAPGtCwuGKeJ0S/lB+6EU=; b=M60DBj5JGGyTdfa6TNjs3+dFtzjvLP46HZPcndTv52vLqBd8TuRmcqncQcP5js1ueV JZF9C8goAepNGU47poIvk242uS+8eo7FcK4gtQqzBS24XCVhWUs+p0CtVsfQiiMncqE9 +IWS5aAL6lf6FoLRojC4hHfM1ZAMf8JSObC/640cm8Y/rEUMqOSybiIin5rQ4wMzTBVS b4o3IKzHlwHqtwKS+pM2P43q14HBgF5B0AOjBM6fmvJyD+vHcXy+FHH/lQrg54W4BveR Uzelr367s+1kWFApR0eH5E+7LS6hCZUKHUV3AsLY6OQwmheMZSR/uTs4ueG7feMFCICW EEZg== 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=Oklbnikg2sDkLJzk8FxWUzXmefE9yoS7dD1JgLMP5zmlcsvq7Qu8b4VTbsF3XgQknI CnPemXlePo92uIATjEVj/Ozabnz8vzPkkCCkFSyhORxTXyKBAjNZ6p6cMCgqXk9PO/XF EdDiUe6gUsC37DIZZDaGrBWdgKyRi8Ae3Ec9s4rKZj1yVQ+x1KrXf9+wF8m7JAIAjb3S w1BWIDxO3AyYVzTCxMkZRdiKa9Ukf44v6kaRwlnqIDDx0PtPwpxVeQxaqhi+2L4K2TUw OIUhyVMMOgVmIHpB/TufXWQ+p1ZLJL3LOfqAiiV0G8qPhIe7LekOTncuue1668cUEFSg QJSQ== X-Gm-Message-State: AOAM532ef1Zi4RbunmO8OXck+9rQlKybCuv1qNc6cB/g2Rtn9ovezMJZ 6lE/w0n4cSkf+nc9ojAIse0= X-Google-Smtp-Source: ABdhPJy09zpefjloqZzg0k0EEip8PmilCqhXjcR92DepO7vMmL9jP8rmuTM7q+/i+u2U8tBq31Jobg== X-Received: by 2002:aa7:9851:0:b0:44b:a36d:e0a2 with SMTP id n17-20020aa79851000000b0044ba36de0a2mr3594642pfq.1.1632853361772; Tue, 28 Sep 2021 11:22:41 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22: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 v3 13/14] ARM: bcm: Removed forced select of interrupt controllers Date: Tue, 28 Sep 2021 11:21:38 -0700 Message-Id: <20210928182139.652896-14-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112242_984112_9DF2589B X-CRM114-Status: GOOD ( 13.92 ) 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 Tue Sep 28 18:21:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12523543 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 4986AC4167D for ; Tue, 28 Sep 2021 18:31:49 +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 1D0E86137D for ; Tue, 28 Sep 2021 18:31:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1D0E86137D 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=2g0kO3fXpmjNzJiEcVvxhjvNeo46pAWAVvc8yBXgOzI=; b=m1zfovU6K3vKwF X/V1IYc4nX9ljhgig0yfetdDoIEX1jwYEOHdj0k7+WSlf1mFIAJ4rxrAtenwh0FXA/l8KRLxJezYT rUOYswkzXwT6R9igkBYszxtz8lrdnAQEtQiZQuMvtQBUqDBYKnMRGF6pNJllJsXVOVA1VRHgXY8NM he4MwDL/wDyM4PPL7l1zkPfdoXKMDfuEno9Bpj7ZbXwTBkvUAnY8+djp8Z6dS3AmePJZrbhSJv4w2 qyfhiNZip4TM7CqmjcsonBRlaYVO0J1TMlICHt+EFZNWhtPPBTvmES+YVgLBH0EeUJFbA/VbxZYIq NQojYTH9mGTdjxdWVdiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHrT-008RLq-De; Tue, 28 Sep 2021 18:29:52 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHka-008OFI-Em for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:45 +0000 Received: by mail-pl1-x62f.google.com with SMTP id b22so4001047pls.1 for ; Tue, 28 Sep 2021 11:22:43 -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=T26BgQWn/9mqdmIjsWawB6f+e1Yr/GOlus2xPhKaou0=; b=RhuXW/WrvdSvfA58ICAu0BTKmIcI5wLVZB6iD8y8Wx+S1F5LwMRHCB0mieSVudR9U2 Hmdwdxke9QyW/2z9Amt1BKbC1E9JjfSKObvhoH2+eVGxShWx0iIb/gz0rE1NDsqMBxSO ufsONr358HP5fTCK2y1RQcSt33qerPulnSWUZBCcbibXBu/SHvEB9Tz2T6J0vHsmF8eO 0Te7SJIzgXGLLMz6PTIrTctBdVPmruGQ8WiZZJc+S6WGZ2LdxEFrVqJwhMFLRslqAWAR 7UbfA4eq9eECcKJ08qSwzxncTpug2P3x5HX4JE+nkK//p7fvNBHXazTfBNxK8v5OoVZj 0GSg== 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=T26BgQWn/9mqdmIjsWawB6f+e1Yr/GOlus2xPhKaou0=; b=c9h1QHqfJ6aKTjxI8703zd1Qc0B5okW0P349WzhLf5gsp20YgOmVAhkix74Z6EYr87 KsunQWw6qCcWQIOQhe1jdGv4LuG2BCtkPfsS9dKnNP0m9cp6QPR86cpFiWrjbUmWFOle GNM1H3YyUoR2vIKZSTqabgH9EOWAi7pcKZ2a6LgJuzjmMlZB1UdFQcQYXvoEB+7Qt5Ds uNwQIraqo2roK6W8QngIfw3M5AVprMDHGhZS19ay6hVlDR+AT8rWwqPw7NmrHhAXHsBv f5Z90kMtQoUuyWiEWJovIli507H4SwU3c7ZyvuZTmrfpZizN3vqNGH96Q0hTenCSWOVl EZRA== X-Gm-Message-State: AOAM531w6zujSt1ZYqm4B7S3SVh0vit4EYZ1vEl2CCIrCIaoMk1ETJa2 Q1u0g1A2LmGoaS72ntlpTSo= X-Google-Smtp-Source: ABdhPJyOgDfKEUX2wbPsA3GK0AJrY9DGZLrVCNUZ2532DUtclW4D9RAcuPdX7AkDmsWUn3PocI0sCA== X-Received: by 2002:a17:902:c3c5:b0:13d:efe4:c10a with SMTP id j5-20020a170902c3c500b0013defe4c10amr6402436plj.54.1632853363287; Tue, 28 Sep 2021 11:22:43 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22:42 -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 v3 14/14] irqchip: Fix kernel-doc parameter typo for IRQCHIP_DECLARE Date: Tue, 28 Sep 2021 11:21:39 -0700 Message-Id: <20210928182139.652896-15-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112244_520040_895BB458 X-CRM114-Status: GOOD ( 16.16 ) 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 argument 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)