[RFC PATCH v2 04/10] lib: vdso: get pointer to vdso data from the arch
Andy Lutomirski
luto at kernel.org
Tue Dec 24 13:27:40 AEDT 2019
On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy
<christophe.leroy at c-s.fr> wrote:
>
> On powerpc, __arch_get_vdso_data() clobbers the link register,
> requiring the caller to set a stack frame in order to save it.
>
> As the parent function already has to set a stack frame and save
> the link register to call the C vdso function, retriving the
> vdso data pointer there is lighter.
I'm confused. Can't you inline __arch_get_vdso_data()? Or is the
issue that you can't retrieve the program counter on power without
clobbering the link register?
I would imagine that this patch generates worse code on any
architecture with PC-relative addressing modes (which includes at
least x86_64, and I would guess includes most modern architectures).
--Andy
More information about the Linuxppc-dev
mailing list