Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4416637iob; Sun, 8 May 2022 12:03:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ2uSybkFEPkS911EG2ELBj11PdxRNlFBb0b9TXyIjhuTqK6pR0Q/PWR7x6pmeDfQXLzcY X-Received: by 2002:a63:531c:0:b0:3c6:a5d7:8bae with SMTP id h28-20020a63531c000000b003c6a5d78baemr3270290pgb.505.1652036582757; Sun, 08 May 2022 12:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652036582; cv=none; d=google.com; s=arc-20160816; b=k8LlGkdJ0VKJtCDK6uFNArobUoKBwHEgnjEy+0wWOOGaehkJA11O7lSK6amFjEPsz8 X6m8VPVDDDzbxG5pbG5tiNQKAbakXpEaUIQBJmbKyjB3u9YXPi5kpdiUNL8oYqgFXma9 Ph9DgYdwD5PRtIR+c6p41hsAieA1SIQQGewHlyzw7eW9/yOyLaLkvuQB8CU3VInGvXOR oGJ/ardIRObOPS6lmEpZxNxX+v0zafc9Pj+8K0D80zEJLUc7mPIJEiJNvJji8vBjdRmX Et90A6OLlRSHe6X6vmiNKA7s8IVIbOzUwOrwdl6rQdBvfEju8xYKk9LkBlpRC/aRxRDh 7VGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=yEEiGomcOYhMnteRAbtxxaEBfAek9bdMMc4yXKiUfs4=; b=Ll0iRswgXj5BMY/1t7jt4rFcN8ipChXPRt0/YKqoTnf7OtKiuj2yta/UrrwFA5iR9r f/3QeYTFrG5Q8Nqv5iMLFYsi3P22LOIcgN53nn5dm/PD+EgJtf5uL2gt7XNuM59mGzYb u2dGrqLFmhYxqLw6n5cTJV/5cUHWv1sBqIDFCV+k7wTndZrXoJKTsLJT4/AKrWMtSVyk P2PACwVsW2OJVJu5kJtSTXU48SpKOuvwRsmSDznDsltfUjsQsIoBkhnTW1Cy/a1PBp34 zbQh9RtfSw8FTiOzdMRlunJgRdE6Yd0NolFzJf1PFtuwHrFsm0EMOnZyKebQMgMFYGc9 EzTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="NLTyj2t/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=jRqUjnmE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a65464c000000b003ab7a1a4f11si12188446pgr.315.2022.05.08.12.02.47; Sun, 08 May 2022 12:03:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="NLTyj2t/"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=jRqUjnmE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391302AbiEFL3B (ORCPT + 99 others); Fri, 6 May 2022 07:29:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239272AbiEFL27 (ORCPT ); Fri, 6 May 2022 07:28:59 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82C505469C for ; Fri, 6 May 2022 04:25:16 -0700 (PDT) Date: Fri, 06 May 2022 11:25:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651836315; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yEEiGomcOYhMnteRAbtxxaEBfAek9bdMMc4yXKiUfs4=; b=NLTyj2t/tpMdbbWHvhlX5Eo/nRj4d3GxMkZBs9poDhRWRhPb3yqvZYpVe9+R+EdcxwxaGv WuLCD9Uzjur8vguxhF0Xk2EcnLR0MJx6bPnflteiE68jQeVUTALXDu2ZInQzqzXvtD+Sck 1r48g8aju3q/Air3XHu2K5ul2BzzYKpciipeMgClFGXayJ1kaEXsDYzThO3Hb37GCUagon yCUDH+V2APYL1DjYdiuEl0uhokfsyB/rjR8cK444qfmAullqe+hQSLL+IrgZKOxkZSEWIH PB0pscdHUtP8sTyoWnMnWZ1VUZNGmu55U1lJGYSGynW6eytApc0Q+esnK/PT1A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651836315; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yEEiGomcOYhMnteRAbtxxaEBfAek9bdMMc4yXKiUfs4=; b=jRqUjnmE9C8PV8vpYxKccRHUvoUMYw5ZjhqJa5/N1O9geX6fyMkcTtXFhOe7YmRtCixEHr KFvF6kosKR7yo/CQ== From: irqchip-bot for Pali =?utf-8?q?Roh=C3=A1r?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1 Cc: pali@kernel.org, Marc Zyngier , tglx@linutronix.de In-Reply-To: <20220425113706.29310-2-pali@kernel.org> References: <20220425113706.29310-2-pali@kernel.org> MIME-Version: 1.0 Message-ID: <165183631358.4207.11410029183803941850.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/irqchip-next branch of irqc= hip: Commit-ID: baf78c1078b474aed18864796a8161784dd81fc2 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platfo= rms/baf78c1078b474aed18864796a8161784dd81fc2 Author: Pali Roh=C3=A1r AuthorDate: Mon, 25 Apr 2022 13:37:06 +02:00 Committer: Marc Zyngier CommitterDate: Fri, 06 May 2022 12:20:27 +01:00 irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1 IRQs 0 and 1 cannot be mapped, they are handled internally by this driver and this driver does not call generic_handle_domain_irq() for these IRQs. So do not allow mapping these IRQs and correctly propagate error from the .irq_map callback. Signed-off-by: Pali Roh=C3=A1r Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220425113706.29310-2-pali@kernel.org --- 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 ee18eb3..ab02b44 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -567,6 +567,10 @@ static struct irq_chip armada_370_xp_irq_chip =3D { 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 <=3D 1) + return -EINVAL; + armada_370_xp_irq_mask(irq_get_irq_data(virq)); if (!is_percpu_irq(hw)) writel(hw, per_cpu_int_base +