From: "Björn Töpel" <bjorn@kernel.org>
To: Conor Dooley <conor.dooley@microchip.com>,
Anup Patel <apatel@ventanamicro.com>
Cc: "Conor Dooley" <conor@kernel.org>,
"Alexandre Ghiti" <alexghiti@rivosinc.com>,
"Anup Patel" <anup@brainfault.org>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Andrea Parri" <andrea@rivosinc.com>,
"Samuel Holland" <samuel.holland@sifive.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org,
"Björn Töpel" <bjorn@rivosinc.com>,
"Andrea Parri" <parri.andrea@gmail.com>
Subject: Re: [PATCH v3 2/2] riscv: Fix text patching when IPI are used
Date: Tue, 05 Mar 2024 09:21:07 +0100 [thread overview]
Message-ID: <87frx5ozrg.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <20240305-sarcasm-ending-0f7946490aea@wendy>
Conor Dooley <conor.dooley@microchip.com> writes:
> On Tue, Mar 05, 2024 at 08:33:30AM +0530, Anup Patel wrote:
>> On Tue, Mar 5, 2024 at 1:54 AM Björn Töpel <bjorn@kernel.org> wrote:
>> >
>> > Conor Dooley <conor@kernel.org> writes:
>> >
>> > > On Thu, Feb 29, 2024 at 01:10:56PM +0100, Alexandre Ghiti wrote:
>> > >> For now, we use stop_machine() to patch the text and when we use IPIs for
>> > >> remote icache flushes (which is emitted in patch_text_nosync()), the system
>> > >> hangs.
>> > >>
>> > >> So instead, make sure every CPU executes the stop_machine() patching
>> > >> function and emit a local icache flush there.
>> > >>
>> > >> Co-developed-by: Björn Töpel <bjorn@rivosinc.com>
>> > >> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
>> > >> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
>> > >> Reviewed-by: Andrea Parri <parri.andrea@gmail.com>
>> > >
>> > > What commit does this fix?
>> >
>> > Hmm. The bug is exposed when the AIA IPI are introduced, and used
>> > (instead of the firmware-based).
>> >
>> > I'm not sure this is something we'd like backported, but rather a
>> > prerequisite to AIA.
>> >
>> > @Anup @Alex WDYT?
>> >
>>
>> The current text patching never considered IPIs being injected
>> directly in S-mode from hart to another so we are seeing this
>> issue now with AIA IPIs.
>>
>> We certainly don't need to backport this fix since it's more
>> of a preparatory fix for AIA IPIs.
>
> Whether or not this is backportable, if it fixes a bug, it should get
> a Fixes: tag for the commit that it fixes. Fixes: isn't "the backport"
> tag, cc: stable is.
I guess the question is if this *is* a fix, or rather a change required
for AIA (not a fix).
next prev parent reply other threads:[~2024-03-05 8:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 12:10 [PATCH v3 0/2] riscv: fix patching with IPI Alexandre Ghiti
2024-02-29 12:10 ` [PATCH v3 1/2] riscv: Remove superfluous smp_mb() Alexandre Ghiti
2024-03-04 19:25 ` Conor Dooley
2024-04-17 1:29 ` Palmer Dabbelt
2024-02-29 12:10 ` [PATCH v3 2/2] riscv: Fix text patching when IPI are used Alexandre Ghiti
2024-03-04 19:27 ` Conor Dooley
2024-03-04 20:24 ` Björn Töpel
2024-03-05 3:03 ` Anup Patel
2024-03-05 7:59 ` Conor Dooley
2024-03-05 8:21 ` Björn Töpel [this message]
2024-04-28 22:00 ` [PATCH v3 0/2] riscv: fix patching with IPI patchwork-bot+linux-riscv
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=87frx5ozrg.fsf@all.your.base.are.belong.to.us \
--to=bjorn@kernel.org \
--cc=alexghiti@rivosinc.com \
--cc=andrea@rivosinc.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=bjorn@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=conor@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=palmer@dabbelt.com \
--cc=parri.andrea@gmail.com \
--cc=paul.walmsley@sifive.com \
--cc=rostedt@goodmis.org \
--cc=samuel.holland@sifive.com \
/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®