From patchwork Fri Jun 16 12:03:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 109086 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1301118vqr; Fri, 16 Jun 2023 05:22:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6cPdzOQqnNmH/8SebQ5tOzJ86pDHeF+zUiQhMV57ROTZJGRsNH2FslXjF/egzslcDQGztZ X-Received: by 2002:a92:cf44:0:b0:335:fc8:9b4 with SMTP id c4-20020a92cf44000000b003350fc809b4mr2200964ilr.19.1686918167660; Fri, 16 Jun 2023 05:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686918167; cv=none; d=google.com; s=arc-20160816; b=HHpmNoARIFlbPK3cixrCdBw5ApjUY+KbQIC2vsUSKdOjygkeIPDaGpN0Xns9Fi/0MJ IKGjtCiC5oS7wDUby/oUywVkU1iwtcEol2wAA933XWfhZbCJJ+hsEeuvV9oB/iykP+U/ SAFF8PHhuKI5jCU3f5ZC0Omhz15Zi3Rja7pYhIk1hA9RPSlLqOkSTrQgXM8kDJ/sMzhS qeOVNLfQ49mErdJ2+CeXCheN9fK1VQu3iPUrXjv/Bktgo03a0Eun6AMy9YjbcsfrP1O9 g5vOFcIJ3EAl+o4Kpdij42hp+L6fHiiM48ncEOu/0zHgAZgUhwYUBWrjCBpgeinO5y0y 6ogg== 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=46vrl4ylUTLsMdMSynSrUU4Cn+HCsdL3cBHiPpuWos0=; b=QIIUH+6mDviqZU1ih8v52tbViljKSQ55kihWloorrAGfxkQ0mnvip8lcgQO3xy4rea Her9sIDlQcjsRvrkxq4z09gL7Y31LGxBAMkJmkyp3gVFi08ql39hibD7LShKSmf2PQOq KrzMMiAveH5cPU8prL8gEVZ5syNBZo7539IsyIPTvuOe4SiDe3ZcXUkYLzJA7tiGDgGA jl/9qwGHhUoXgov6TKwhiZv71MGQG2E462RwpmmdUZwB6t86sz6rhlKHgGy6z3NmYpm4 KwzkF7b+LhBEQzGZ7TJFfpfNlpp8CufNFJRcG48nl2OzteuHjTZT5J3TsSWvwO1NHwn0 Vw7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1b81gD2q; dkim=neutral (no key) header.i=@linutronix.de header.b=pNn8smC+; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk13-20020a056a02028d00b0054ff739cfa2si3367027pgb.449.2023.06.16.05.22.32; Fri, 16 Jun 2023 05:22:47 -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=1b81gD2q; dkim=neutral (no key) header.i=@linutronix.de header.b=pNn8smC+; 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 S1345135AbjFPMDW (ORCPT + 99 others); Fri, 16 Jun 2023 08:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344589AbjFPMDN (ORCPT ); Fri, 16 Jun 2023 08:03:13 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02AEF2D69; Fri, 16 Jun 2023 05:03:12 -0700 (PDT) Date: Fri, 16 Jun 2023 12:03:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686916990; 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=46vrl4ylUTLsMdMSynSrUU4Cn+HCsdL3cBHiPpuWos0=; b=1b81gD2qZYQPf2bAHZ/S0802+LZYvoOAfXNuAA1yXvdEQhqHdGzrytYgX0uTuXmXHqfyMc N9ah6hMaYgddjP8IDJNnqJSpLHouhQpOSvd72F5RNX63PvbXTrCegkWCQQ67QcDZvnwAzX hZEOXMGwN5IggR4vKXMhSg8QiBwQzQNje/NQeYIDbvl32Hiu5pKDXFzlvttAo0GIQvQtjK /E0N60h16PdYxYNSLD71jEl8XgQSEukEKVWbBS6CyWGV2m18uzmNOlFLn6DwtwEi4RK/Dp gh0qucgK9jm/GgTH/gsTOB+2DNHPsmh2M/v3VrGIYp9rd5FhZWNwbXPDcmw14w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686916990; 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=46vrl4ylUTLsMdMSynSrUU4Cn+HCsdL3cBHiPpuWos0=; b=pNn8smC+BOAVS5eGRt5UwxEHVLZH4cLiI8s+IYSpjGkQI8zOdc2nWu0ClQ4qSQAcwOKYww 5c8+hb84UEd1fLDA== From: "irqchip-bot for Liu Peibao" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/loongson-pch-pic: Fix potential incorrect hwirq assignment Cc: stable@vger.kernel.org, Huacai Chen , Liu Peibao , Jianmin Lv , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230614115936.5950-3-lvjianmin@loongson.cn> References: <20230614115936.5950-3-lvjianmin@loongson.cn> MIME-Version: 1.0 Message-ID: <168691699008.404.10069556524976905462.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768680110177706641?= X-GMAIL-MSGID: =?utf-8?q?1768861904517866991?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 783422e704ca0fa41cb2fe9ed79e46b6fe7eae29 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/783422e704ca0fa41cb2fe9ed79e46b6fe7eae29 Author: Liu Peibao AuthorDate: Wed, 14 Jun 2023 19:59:33 +08:00 Committer: Marc Zyngier CommitterDate: Fri, 16 Jun 2023 12:59:28 +01:00 irqchip/loongson-pch-pic: Fix potential incorrect hwirq assignment In DeviceTree path, when ht_vec_base is not zero, the hwirq of PCH PIC will be assigned incorrectly. Because when pch_pic_domain_translate() adds the ht_vec_base to hwirq, the hwirq does not have the ht_vec_base subtracted when calling irq_domain_set_info(). The ht_vec_base is designed for the parent irq chip/domain of the PCH PIC. It seems not proper to deal this in callbacks of the PCH PIC domain and let's put this back like the initial commit ef8c01eb64ca ("irqchip: Add Loongson PCH PIC controller"). Fixes: bcdd75c596c8 ("irqchip/loongson-pch-pic: Add ACPI init support") Cc: stable@vger.kernel.org Reviewed-by: Huacai Chen Signed-off-by: Liu Peibao Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230614115936.5950-3-lvjianmin@loongson.cn --- drivers/irqchip/irq-loongson-pch-pic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c index 921c5c0..93a71f6 100644 --- a/drivers/irqchip/irq-loongson-pch-pic.c +++ b/drivers/irqchip/irq-loongson-pch-pic.c @@ -164,7 +164,7 @@ static int pch_pic_domain_translate(struct irq_domain *d, if (fwspec->param_count < 2) return -EINVAL; - *hwirq = fwspec->param[0] + priv->ht_vec_base; + *hwirq = fwspec->param[0]; *type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK; } else { if (fwspec->param_count < 1) @@ -196,7 +196,7 @@ static int pch_pic_alloc(struct irq_domain *domain, unsigned int virq, parent_fwspec.fwnode = domain->parent->fwnode; parent_fwspec.param_count = 1; - parent_fwspec.param[0] = hwirq; + parent_fwspec.param[0] = hwirq + priv->ht_vec_base; err = irq_domain_alloc_irqs_parent(domain, virq, 1, &parent_fwspec); if (err)