PPC code-patching calls tlb flush with irqs disabled?

Arnd Bergmann arnd at arndb.de
Wed Nov 19 23:12:46 AEDT 2025


On Wed, Nov 19, 2025, at 11:40, Christophe Leroy wrote:
> Le 19/11/2025 à 08:38, Christian Melki a écrit :

> We don't want an interrupt in the middle of a patching sequence were the 
> code would be in a wobbly situation.
> We also don't want other parts of kelnel being able to access that 
> temporary RW mapping of kernel code until it is unmapped.
>
> How can we achieve this goal if we can't flush TLBs while IRQs are 
> disabled ?

On 32-bit arm, we have the same problem, and AFAICT the workaround
here is to use stop_machine() as part of patch_text(), to
ensure a local TLB flush is sufficient.

   Arnd


More information about the Linuxppc-dev mailing list