lkml.org 
[lkml]   [2022]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] powerpc/32: Add support for out-of-line static calls
From
Hi Peter,

Le 31/08/2021 à 16:00, Peter Zijlstra a écrit :
> On Tue, Aug 31, 2021 at 01:12:26PM +0000, Christophe Leroy wrote:
>
> Yes, this should work nicely!
>
> Since you have the two nop's at the end, you could frob in an
> optimization for __static_call_return0 without too much issue.
>
> Replace the two nops with (excuse my ppc asm):
>
> li r3, 0
> blr
>
> and augment arch_static_call_transform() with something like:
>
> if (func == &__static_call_return0)
> err = patch_branch(tramp, tramp+24, 0);

I just discovered that we likely have an issue with the implementation
of that RET0 static call.

Looking at System.map I have:

c0004fc0 t __static_call_return0
c0011518 t __static_call_return0
c00d8160 t __static_call_return0


So when we do:

if (func == &__static_call_return0)

It is unlikely that we'll get the expected one.


I see __static_call_return0 is defined as 'static inline' in
include/linux/static_call.h

Any reason for not having it as a single global symbol instead ?

Thanks
Christophe

\
 
 \ /
  Last update: 2022-03-11 15:58    [W:1.322 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site