[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zd/TDyyG/5sxrPWx@andrea>
Date: Thu, 29 Feb 2024 01:42:55 +0100
From: Andrea Parri <parri.andrea@...il.com>
To: Alexandre Ghiti <alexghiti@...osinc.com>
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Andrea Parri <andrea@...osinc.com>,
Anup Patel <anup@...infault.org>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org,
Björn Töpel <bjorn@...osinc.com>
Subject: Re: [PATCH 2/2] riscv: Fix text patching when IPI are used
On Wed, Feb 28, 2024 at 06:51:49PM +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@...osinc.com>
> Signed-off-by: Björn Töpel <bjorn@...osinc.com>
> Signed-off-by: Alexandre Ghiti <alexghiti@...osinc.com>
Modulo the removal of the hunk discussed with Samuel,
Reviewed-by: Andrea Parri <parri.andrea@...il.com>
Some nits / amendments to the inline comments below:
> + /*
> + * Make sure the patching store is effective *before* we
> + * increment the counter which releases all waiting cpus
> + * by using the release version of atomic increment.
> + */
s/cpus/CPUs
s/release version/release variant
The comment could be amended with a description of the matching barrier(s), say,
"The release pairs with the call to local_flush_icache_all() on the waiting CPU".
(Same for the comment in patch_text_cb().)
Andrea
Powered by blists - more mailing lists