From patchwork Fri Jun 21 09:38:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 13707169 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4F6FBC2BA1A for ; Fri, 21 Jun 2024 09:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=H1BcAGA4KDr/B2ljYLqXoAOjEDGUxvw91PxL5ryAjM0=; b=QmH76dL3QOuzbM1PaxGq0Ei3sU sD/5lCBekanFXEvjS+QZYXoLoQp1j0mYEvEP1RXhjrDa39NYAPk9U4ZiK3/wcuI0nf4YNSaEoEf3t idFk/QvQbsNvRC1nyKf5NMCjtsh7+/51XUbFJPLinFmBir4ObC+hckrJV4ly21q9XbhrtVf2IzXDM 7jXvv9eTw2RqFXOYuoePWwxgbiTkiGkadRG1rDI6L2WexBf8Pq7KQDJzgvAy4SEsvGGMFIvhLIEDf kdFqIDSiNbLqc/fMH3CDjxmm9XEZyW+Ww6CF90rgJBXeL6PBEUxppGtx9laK4+kGNIy7jzW812X5/ q6DJDwhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKajI-00000008abe-1OIB; Fri, 21 Jun 2024 09:38:48 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKajC-00000008aYz-2ge5 for linux-arm-kernel@lists.infradead.org; Fri, 21 Jun 2024 09:38:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BE8AD624D4; Fri, 21 Jun 2024 09:38:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9F71C4AF0B; Fri, 21 Jun 2024 09:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718962721; bh=vj6EQMvMATxpuv+etEjf5cI+Mx7UlzGS/ax61uO76rA=; h=From:List-Id:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jd5mVQbk0jTQGRuaCYBn+mTNhDYwXfKLzsyDX4skZSpVKxtIvp3Ed9a3ruEOLVIMR RRV0nWuxzB3Lh21r1t8/HEp1/TcN+Uh0HWvFsNfSeWhizc8027K9To2Zq2rNmd1MGX RcSIj7L6oGa2GZflXxtDgJv3ia9BiMaGciq3qdmoiHRgViNGuQbDl/cmV9Muxil1bo /3rkkPXaNFRy9OwN5UdoKAZ1h7ziXiYu1b+2IEPTPX5G/Vy/tA/ALRuHnWxdv1pPx8 my3odinsO8NxougcTMTJO+ruZmupd9Ii6aPyUdWNYnXfE/zH2x9L8mAVSbqQabY/Ys cWsxjuZ4oCR+Q== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Thomas Gleixner , Arnd Bergmann , soc@kernel.org, linux-arm-kernel@lists.infradead.org, arm@kernel.org, Andy Shevchenko , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Cc: =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH v3 1/5] irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1 Date: Fri, 21 Jun 2024 11:38:28 +0200 Message-ID: <20240621093832.23319-2-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240621093832.23319-1-kabel@kernel.org> References: <20240621093832.23319-1-kabel@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240621_023842_802540_6DA68183 X-CRM114-Status: GOOD ( 12.31 ) 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 From: Pali Rohár IRQs 0 (IPI) and 1 (MSI) are handled internally by this driver, generic_handle_domain_irq() is never called for these IRQs. Disallow mapping these IRQs. Signed-off-by: Pali Rohár [ changed commit message ] Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn --- drivers/irqchip/irq-armada-370-xp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 4b021a67bdfe..f488c35d9130 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -566,6 +566,10 @@ static struct irq_chip armada_370_xp_irq_chip = { static int armada_370_xp_mpic_irq_map(struct irq_domain *h, unsigned int virq, irq_hw_number_t hw) { + /* IRQs 0 and 1 cannot be mapped, they are handled internally */ + if (hw <= 1) + return -EINVAL; + armada_370_xp_irq_mask(irq_get_irq_data(virq)); if (!is_percpu_irq(hw)) writel(hw, per_cpu_int_base +