From patchwork Thu Jun 20 07:37:12 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: 13704915 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 31E40C27C79 for ; Thu, 20 Jun 2024 07:37:39 +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:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7OSv1FiS0iLF2SIYsC9Vy089XEQIvQEpbNtADRhQU5k=; b=4+wm4178t4fSM5AmKPmJuQ4uG6 S2OuMGnbp3j+sfU2sApHdCwLvYEurQbD/a/WEJmhqpbG52b7lODLIM0NEZmGId4Ygds9Mp/8zvAkk jFu8uLiqaLkVnBHS8MaLGZKY5T48GH7JPHopCvOJw4AsqVA6goKLzTr7jvoCcy0jfafs2ltzOw1Q2 MolAJMUrpVcT1nikJiU/lrnoWpijTwsXRXTX/VZ2sbQGnFJ8FJWc1L2vFdjGKm3AtPcBU3qZzE274 NnSi54SSOa50UuWM8+s/HZ3s9hp+/iJNuhncXbhaPVCgJntICp5GzRQJCBgayMlZgvnWcOUhcUvsg q3K3or/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKCMM-000000040ZQ-1P1i; Thu, 20 Jun 2024 07:37:30 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKCMH-000000040YC-2Jl3 for linux-arm-kernel@lists.infradead.org; Thu, 20 Jun 2024 07:37:26 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 2F80ACE2392; Thu, 20 Jun 2024 07:37:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57498C2BD10; Thu, 20 Jun 2024 07:37:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718869042; bh=wWsG+klFvcpiixryAZ+uWO3LiazmvaYTn5a544yY6+k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p5hTjTiVNXdzJwlt9FYk9CEHnIYRR6KS8S2/GkcRQrqfeIl25g6tUGQi9CMZUDgb1 p9pISHlLFn9l4HL3MqltbJzKImANd+XM6f18nxxgKcjt00VmchvT+LyBk1urclkFPg KVMV9MydFPM69KDZZNN3mgpWDrfyzKVuYbrAiIf4nnFI338l3KDmc/SU36OyLGrao+ /7W8pMO9MAHFVq5iCcQzH0V8M1NFqICvGi8LDg+QrcaxBj4fhu0nnGnJT8yW2CSq3E WK9QKhTM3WwhHm186ox6zvxGmDrnPF3E2IN73uUA0ASpY8l43SNXyUZ0HC0lVDalL3 gA/1FjoIC2BJA== 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?= Subject: [PATCH v2 1/4] irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1 Date: Thu, 20 Jun 2024 09:37:12 +0200 Message-ID: <20240620073715.13560-2-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240620073715.13560-1-kabel@kernel.org> References: <20240620073715.13560-1-kabel@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240620_003725_811119_E253C700 X-CRM114-Status: GOOD ( 11.55 ) 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 +