[RFC PATCH v1 1/3] Revert "powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto"

Naveen N Rao naveen at kernel.org
Tue Jun 20 15:21:25 AEST 2023


Christophe Leroy wrote:
> This reverts commit 1e688dd2a3d6759d416616ff07afc4bb836c4213.
> 
> That commit aimed at optimising the code around generation of
> WARN_ON/BUG_ON but this leads to a lot of dead code erroneously
> generated by GCC.
> 
>      text	   data	    bss	    dec	    hex	filename
>   9551585	3627834	 224376	13403795	 cc8693	vmlinux.before
>   9535281	3628358	 224376	13388015	 cc48ef	vmlinux.after
> 
> Once this change is reverted, in a standard configuration (pmac32 +
> function tracer) the text is reduced by 16k which is around 1.7%

Aneesh recently reported a build failure due to the use of 'asm goto' in  
WARN_ON(). We were able to root-cause it to the use of 'asm goto' with 
two config options: CONFIG_CC_OPTIMIZE_FOR_SIZE and 
CONFIG_DEBUG_SECTION_MISMATCH.

Along with the issues we found with 'asm goto' during objtool 
enablement, I think it might be better to disable it for now.
Acked-by: Naveen N Rao <naveen at kernel.org>


- Naveen



More information about the Linuxppc-dev mailing list