mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Vladimir Kondratiev" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>,
	Thomas Gleixner <tglx@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] irqchip/riscv-aplic: Do not mark the syscore registered flag ro_after_init
Date: Mon, 09 Nov 2026 09:22:57 -0000	[thread overview]
Message-ID: <179421617723.2093942.10236928397108586294.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20261020-aplic-async-probe-v5-1-c4861c2aafca@mobileye.com>

The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     401632b77cc38bb6de44a2e83ed7c777e540119c
Gitweb:        https://git.kernel.org/tip/401632b77cc38bb6de44a2e83ed7c777e540119c
Author:        Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
AuthorDate:    Tue, 20 Oct 2026 18:38:48 +03:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Mon, 09 Nov 2026 10:20:17 +01:00

irqchip/riscv-aplic: Do not mark the syscore registered flag ro_after_init

aplic_syscore_registered is marked __ro_after_init, but it is written
from aplic_probe(), which can run after init. With MSI, aplic_msi_setup()
returns -EPROBE_DEFER while the MSI parent (IMSIC) is not ready, so the
later successful probe writes the flag after it has been made read-only.
That write faults.

Drop the __ro_after_init annotation so the flag stays writable.

Fixes: b330fbfd34d7 ("irqchip/riscv-aplic: Register syscore operations only once")
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20261020-aplic-async-probe-v5-1-c4861c2aafca@mobileye.com
---
 drivers/irqchip/irq-riscv-aplic-main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-riscv-aplic-main.c
index 1676d64..a2c4d14 100644
--- a/drivers/irqchip/irq-riscv-aplic-main.c
+++ b/drivers/irqchip/irq-riscv-aplic-main.c
@@ -116,7 +116,11 @@ static struct syscore aplic_syscore = {
 	.ops = &aplic_syscore_ops,
 };
 
-static bool aplic_syscore_registered __ro_after_init;
+/*
+ * Not __ro_after_init: probe can be deferred (e.g. MSI mode waiting for the
+ * IMSIC) and complete after the init memory is made read-only.
+ */
+static bool aplic_syscore_registered;
 
 static void aplic_syscore_init(void)
 {

  reply	other threads:[~2026-11-09  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 15:38 [PATCH v5 0/2] irqchip/riscv-aplic: fix probing of multiple APLIC instances Vladimir Kondratiev
2026-10-20 15:38 ` [PATCH v5 1/2] irqchip/riscv-aplic: do not mark the syscore registered flag ro_after_init Vladimir Kondratiev
2026-11-09  9:22   ` tip-bot2 for Vladimir Kondratiev [this message]
2026-10-20 15:38 ` [PATCH v5 2/2] irqchip/riscv-aplic: force synchronous probing Vladimir Kondratiev
2026-11-09  9:22   ` [tip: irq/drivers] irqchip/riscv-aplic: Force " tip-bot2 for Vladimir Kondratiev
2026-11-10  8:07   ` [PATCH v5 2/2] irqchip/riscv-aplic: force " Anup Patel
2026-11-12 12:11     ` Vladimir Kondratiev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179421617723.2093942.10236928397108586294.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=vladimir.kondratiev@mobileye.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®