[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c0b8cb0e-cd96-d660-db87-51ded45435c2@csgroup.eu>
Date: Fri, 11 Mar 2022 15:56:57 +0100
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
Josh Poimboeuf <jpoimboe@...hat.com>,
Jason Baron <jbaron@...mai.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [PATCH v2] powerpc/32: Add support for out-of-line static calls
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
Powered by blists - more mailing lists