From nobody Thu Apr 9 12:09:59 2026 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [160.30.148.35]) (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 0E04B28853A for ; Mon, 9 Mar 2026 08:11:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=160.30.148.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773043915; cv=none; b=Ji/X1+h7MhXF7fM1clyjsQ2MsUn+t2blWwA9IIAgAUd02xPYUZPgYUZ0XHo1b7tOs68UPgg6Bzjpw6kqTi6uBhek37cGQ1nEclNDklTWdSqF+mve02wZvzycC1lUadzJbSSVcHHc+WaWjAhqa0ZL0Op0P8g9a7ItfO204L90CFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773043915; c=relaxed/simple; bh=hcd8cNsuWZ9W5zlDNq/5hh9c3WhhB//41e0MTW3TL+Q=; h=Message-ID:Date:Mime-Version:From:To:Cc:Subject:Content-Type; b=P5gJQdwTMTezgUzIzI8rwPwRhQ+S9GUalWSSthtkxzdy4Eggo4DBB4l7XoKQdBcYGdj4eFFcpFm3B/VbdnIKl5XOFVlkwimrrLBpXUIzp3oBX95/LMxr8acocHsVhJA+CDg9GZweydmF0VytP83wxmfsROwm3pHb1BEHt/L5dmU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=160.30.148.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4fTqVF3GHcz8Xs7T; Mon, 09 Mar 2026 16:11:49 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl1.zte.com.cn with SMTP id 6298Bbfg046466; Mon, 9 Mar 2026 16:11:37 +0800 (+08) (envelope-from liu.xuemei1@zte.com.cn) Received: from mapi (xaxapp05[null]) by mapi (Zmail) with MAPI id mid32; Mon, 9 Mar 2026 16:11:40 +0800 (CST) X-Zmail-TransId: 2afc69ae80bc9de-cfb58 X-Mailer: Zmail v1.0 Message-ID: <20260309161140133ZhM76Wt3uPliHU5_R8O0j@zte.com.cn> Date: Mon, 9 Mar 2026 16:11:40 +0800 (CST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , , , , , , , , , Cc: , Subject: =?UTF-8?B?W1BBVENIXSBpcnFjaGlwL3Jpc2N2LWFwbGljOiBSZWdpc3RlciBzeXNjb3JlIG9wZXJhdGlvbnMgb25seSBvbmNl?= X-MAIL: mse-fl1.zte.com.cn 6298Bbfg046466 X-TLS: YES X-SPF-DOMAIN: zte.com.cn X-ENVELOPE-SENDER: liu.xuemei1@zte.com.cn X-SPF: None X-SOURCE-IP: 10.5.228.132 unknown Mon, 09 Mar 2026 16:11:50 +0800 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 69AE80C5.000/4fTqVF3GHcz8Xs7T Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jessica Liu We can have multiple APLIC instances so setup global state and resgister syscore operations only once. Fixes: 95a8ddde3660 ("irqchip/riscv-aplic: Preserve APLIC states across sus= pend/resume") Signed-off-by: Jessica Liu --- drivers/irqchip/irq-riscv-aplic-main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-r= iscv-aplic-main.c index 4495ca26abf5..8299e0da6577 100644 --- a/drivers/irqchip/irq-riscv-aplic-main.c +++ b/drivers/irqchip/irq-riscv-aplic-main.c @@ -20,6 +20,7 @@ #include "irq-riscv-aplic-main.h" static LIST_HEAD(aplics); +static bool aplic_global_setup_done __ro_after_init; static void aplic_restore_states(struct aplic_priv *priv) { @@ -375,8 +376,10 @@ static int aplic_probe(struct platform_device *pdev) if (rc) dev_err_probe(dev, rc, "failed to setup APLIC in %s mode\n", msi_mode ? "MSI" : "direct"); - else + else if (!aplic_global_setup_done) { register_syscore(&aplic_syscore); + aplic_global_setup_done =3D true; + } #ifdef CONFIG_ACPI if (!acpi_disabled) --=20 2.27.0