From nobody Sun Feb 8 06:49:42 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B19FCEB64D8 for ; Fri, 16 Jun 2023 12:03:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345147AbjFPMDX (ORCPT ); Fri, 16 Jun 2023 08:03:23 -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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 ir= qchip: Commit-ID: 783422e704ca0fa41cb2fe9ed79e46b6fe7eae29 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-plat= forms/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-l= oongson-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; =20 - *hwirq =3D fwspec->param[0] + priv->ht_vec_base; + *hwirq =3D fwspec->param[0]; *type =3D 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, uns= igned int virq, =20 parent_fwspec.fwnode =3D domain->parent->fwnode; parent_fwspec.param_count =3D 1; - parent_fwspec.param[0] =3D hwirq; + parent_fwspec.param[0] =3D hwirq + priv->ht_vec_base; =20 err =3D irq_domain_alloc_irqs_parent(domain, virq, 1, &parent_fwspec); if (err)