From patchwork Wed Jun 19 14:11:31 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: 13703882 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 AEFC8C27C53 for ; Wed, 19 Jun 2024 14:12:02 +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=RK8w32QGYAWMT7m9JYkUXMurfHp/XgZwlTicXsJhoUk=; b=AzVjXkTmcDtJew5v11n38j5oAj tEqO8atKCMHq0kaDULPWS++wT6xHLOt0x694qUNnS1n4r8OgqjIZry7xjnODU8GG3s0NKL8zyh5Kc lWSgTQ3cE1E6+F1nWdehNpOqxsW7TheEiZ6qLV1IahAVNJLnk1b8yyO1KCFKuPtYIzRAIdp5zhzf7 VjXRiyKNHwRYJh4c2SvKXfT8xVQ9VEUlKn81PCDWmhRAp4Y3HrXyfLGICiJV41jv+j7yeaPuGT8kz meOXNnGg1lkMfGlCMlg82eX229oRuvQKcyexo4ScU30ZHWCQFPPFhikn5vkPSridyJelezwt2wH22 54LQDWRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJw2T-00000001SQy-2qvO; Wed, 19 Jun 2024 14:11:53 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJw2M-00000001SMm-2XQt for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2024 14:11:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 5A388CE1FAA; Wed, 19 Jun 2024 14:11:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69844C2BBFC; Wed, 19 Jun 2024 14:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718806302; bh=LPfDYE9q8FmeO4Pc8rrdcE/gT77TUCiNnKjpEwrsEPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JVuOF9N9anGjHe9+bcYHi+bygccJhJ2ykldq9zkoAU6EgLJ/GxbVeSNQeYUoDOnkj J72H7YG5H7pQK2++jC3voXFyyaswPC82zvAakV4Yca0eRILKiO0OTFB6t/viIg1cZt MYNlbrG/xUB8VWzEvk0svTXIokTNFSMyNY1AVgKei7Fyp0uJOElyN9Z1psMKMpwe34 +q8gTn03TpHf6/4Z+AjnRY/B8gP89DFvDxeMXSw9WZwWW8OLClZnG0RllIZMAIuNgj zdAGpHT4hqVVaCoJ8mmkkP+9Jg+/FRqYADjQj/GvZ+JQ5Di2HwNPCsALtfMcY4GZ+G asy1ftI7oWZ/A== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Thomas Gleixner , 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?Pali_Roh=C3=A1r?= , =?utf-8?q?Marek_Beh=C3=BA?= =?utf-8?q?n?= Subject: [PATCH 1/4] irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1 Date: Wed, 19 Jun 2024 16:11:31 +0200 Message-ID: <20240619141134.30900-2-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240619141134.30900-1-kabel@kernel.org> References: <20240619141134.30900-1-kabel@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_071146_971862_0B639517 X-CRM114-Status: GOOD ( 12.35 ) 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. Fixes: 344e873e5657 ("arm: mvebu: Add IPI support via doorbells") Fixes: 31f614edb726 ("irqchip: armada-370-xp: implement MSI support") Signed-off-by: Pali Rohár [ changed commit message, added Fixes tags ] Signed-off-by: Marek Behún --- 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 +