[PATCH] powerpc/64e: Fix obtool warnings in exceptions-64e.S

Michael Ellerman mpe at ellerman.id.au
Fri Jun 23 09:46:32 AEST 2023


Christophe Leroy <christophe.leroy at csgroup.eu> writes:
> Le 22/06/2023 à 13:24, Michael Ellerman a écrit :
>> Since commit aec0ba7472a7 ("powerpc/64: Use -mprofile-kernel for big
>> endian ELFv2 kernels"), this file is checked by objtool. Fix warnings
>> such as:
>> 
>>    arch/powerpc/kernel/idle_64e.o: warning: objtool: .text+0x20: unannotated intra-function call
>>    arch/powerpc/kernel/exceptions-64e.o: warning: objtool: .text+0x218: unannotated intra-function call
>> 
>> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
>> ---
>>   arch/powerpc/kernel/exceptions-64e.S | 31 ++++++++++++++++------------
>>   1 file changed, 18 insertions(+), 13 deletions(-)
>> 
>> diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
>> index 3f86091e68b3..7ab4c8c0f1ab 100644
>> --- a/arch/powerpc/kernel/exceptions-64e.S
>> +++ b/arch/powerpc/kernel/exceptions-64e.S
>> @@ -1030,8 +1037,7 @@ BAD_STACK_TRAMPOLINE(0xe00)
>>   BAD_STACK_TRAMPOLINE(0xf00)
>>   BAD_STACK_TRAMPOLINE(0xf20)
>>   
>> -	.globl	bad_stack_book3e
>> -bad_stack_book3e:
>> +_GLOBAL(bad_stack_book3e)
>>   	/* XXX: Needs to make SPRN_SPRG_GEN depend on exception type */
>>   	mfspr	r10,SPRN_SRR0;		  /* read SRR0 before touching stack */
>>   	ld	r1,PACAEMERGSP(r13)
>
> If we start playing with that now, allthough I have a patch in my 
> UACCESS validation series that totally disables OBJTOOL for ASM files,

Yeah I saw that, and it's probably a good idea in the interim while
we're getting all the uaccess stuff sorted out.

Though these warnings are firing today in my next branch, so I'll plan
to merge this patch for 6.5 to squash them.

> can we ban _GLOBAL macro and use SYM_FUNC_START / SYM_FUNC_END instead ?

Yeah, I'm not a fan of _GLOBAL, it does too much.

We'd obviously need to override the generic SYMC_FUNC_START to do all
the TOC setup and so on when it's needed.

cheers


More information about the Linuxppc-dev mailing list