From nobody Wed Apr 1 12:32:53 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E156D3D647F; Tue, 31 Mar 2026 08:13:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774944805; cv=none; b=YIXGN4B5p8KZgPLJ2+18AlheUoU9T7n5gSx8m4FMqLIBzMSQFmbiARsuXsDoHZ7PYXQ2vVEoLCuxlVXhQRy78yahGGnSy4Zhbx31Y7cCgvlxDlz1fw5njbutUN3okg0qvh5mIiee67LUBT50o6IPZM176n7YkCxCL55U/ufhWr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774944805; c=relaxed/simple; bh=enZp2xF9uYBz17inUU29qZVSmRusqFZugJAFQG19ORU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=MdogtM6sCDr9I5M7wG+oZpGoVIeD5XXK12diK/vw7ztquiXeVy9/4Z+6toaInr4j+OBgiHcoZHdE3sc+UZQuwIUNMmqbUtx1TMLnSpLzcn3Ai70cdgxCklhfaHygccnKLgnKYGj2cQfNzWPR84VWvX3DMp3N/t1R+ZYMx4oBXzU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WCeVP4uq; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JixQeaRZ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WCeVP4uq"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JixQeaRZ" Date: Tue, 31 Mar 2026 08:13:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774944801; 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=Y9/7YSiQoD/jO5e8jeTLLxn6TqrSYJrl3cgFzdqY9jM=; b=WCeVP4uqSPsfVVD8yf33b6tHmaRkcU6dWpEVslE18rEpEUdyOJYj1IuvdHt0n0M5ADD0fn XX0xsr20nOdAo112MeMCBqlQ/DzpehbX+XODH+KNLE9T1CPQnlRRlMl2WAGFz0a5az6WO6 Qf1VQdbWqvGGmbWt1UOrL/ptOsEfCkfTShKJuXYtLaqgRPcznnZnR1ygeCKCBsTGli59oA NZZLLxGx+wnfDpNkeL/eL8rFzK2jlo4TsRI/CM8iv+62aOaaz6l/4VYu2pELE4LasDuqmm EKTMEJMnNALfr29XLo7PKC7xbmeAINLmwoIOVtzgle5hlJ7NOCbWs68ntqGr3A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774944801; 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=Y9/7YSiQoD/jO5e8jeTLLxn6TqrSYJrl3cgFzdqY9jM=; b=JixQeaRZxL4m3CAz3NSYMUsSEJd+nSzBsW4rZJW3HWQlhmW6yCdzmcw6vJU5io0muUDVYN UsYwQdiz5cy4rTCQ== From: "tip-bot2 for Jessica Liu" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] irqchip/riscv-aplic: Restrict genpd notifier to device tree only Cc: Jessica Liu , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20260331093029749vRpdH-0qoEqjS0Wnn9M4x@zte.com.cn> References: <20260331093029749vRpdH-0qoEqjS0Wnn9M4x@zte.com.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177494480015.1647592.14763333594918123952.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/urgent branch of tip: Commit-ID: af416cd9b3fb9d17ac7f4cfa12d1ea83dfd0e4be Gitweb: https://git.kernel.org/tip/af416cd9b3fb9d17ac7f4cfa12d1ea83d= fd0e4be Author: Jessica Liu AuthorDate: Tue, 31 Mar 2026 09:30:29 +08:00 Committer: Thomas Gleixner CommitterDate: Tue, 31 Mar 2026 10:11:29 +02:00 irqchip/riscv-aplic: Restrict genpd notifier to device tree only On ACPI systems, the aplic's pm_domain is set to acpi_general_pm_domain, which provides its own power management callbacks (e.g., runtime_suspend via acpi_subsys_runtime_suspend). aplic_pm_add() unconditionally calls dev_pm_genpd_add_notifier() when dev->pm_domain is non=E2=80=91NULL, leading to a comparison between runtime= _suspend and genpd_runtime_suspend. This results in the following errors when ACPI is enabled: riscv-aplic RSCV0002:00: failed to create APLIC context riscv-aplic RSCV0002:00: error -ENODEV: failed to setup APLIC in MSI mode Fix this by checking for dev->of_node before adding or removing the genpd notifier, ensuring it is only used for device tree based systems. Fixes: 95a8ddde3660 ("irqchip/riscv-aplic: Preserve APLIC states across sus= pend/resume") Signed-off-by: Jessica Liu Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260331093029749vRpdH-0qoEqjS0Wnn9M4x@zte.c= om.cn --- drivers/irqchip/irq-riscv-aplic-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-r= iscv-aplic-main.c index 9f53979..d9afb6a 100644 --- a/drivers/irqchip/irq-riscv-aplic-main.c +++ b/drivers/irqchip/irq-riscv-aplic-main.c @@ -150,7 +150,7 @@ static void aplic_pm_remove(void *data) struct device *dev =3D priv->dev; =20 list_del(&priv->head); - if (dev->pm_domain) + if (dev->pm_domain && dev->of_node) dev_pm_genpd_remove_notifier(dev); } =20 @@ -165,7 +165,7 @@ static int aplic_pm_add(struct device *dev, struct apli= c_priv *priv) =20 priv->saved_hw_regs.srcs =3D srcs; list_add(&priv->head, &aplics); - if (dev->pm_domain) { + if (dev->pm_domain && dev->of_node) { priv->genpd_nb.notifier_call =3D aplic_pm_notifier; ret =3D dev_pm_genpd_add_notifier(dev, &priv->genpd_nb); if (ret)