[PATCH 1/2] powerpc: mark more local variables as volatile

Arnd Bergmann arnd at arndb.de
Wed Aug 9 23:35:46 AEST 2023


On Wed, Aug 9, 2023, at 15:17, Christophe Leroy wrote:
> Le 09/08/2023 à 15:10, Arnd Bergmann a écrit :
>> From: Arnd Bergmann <arnd at arndb.de>
>> 
>> A while ago I created a2305e3de8193 ("powerpc: mark local variables
>> around longjmp as volatile") in order to allow building powerpc with
>> -Wextra enabled on gcc-11.
>
> Should this be explained in 
> https://docs.kernel.org/process/volatile-considered-harmful.html ?
>

My feeling is that these two files are special enough that we
don't have to worry about it in general, there is only one other
caller of setjmp in the kernel, and the setjmp() man page
explicitly mentions this problem and the workaround.

     Arnd


More information about the Linuxppc-dev mailing list