]> git.baikalelectronics.ru Git - kernel.git/commit
lib/vdso: Allow architectures to provide the vdso data pointer
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 7 Feb 2020 12:39:04 +0000 (13:39 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Feb 2020 19:12:18 +0000 (20:12 +0100)
commitd12dc5c01aaa6e98a36917ab1759455fe7085722
treec8f303d2886451c94a8cb67beec824145b28087b
parent6447780c33c3184807b9a336277c35c8e01cb054
lib/vdso: Allow architectures to provide the vdso data pointer

On powerpc, __arch_get_vdso_data() clobbers the link register, requiring
the caller to save it.

As the parent function already has to set a stack frame and saves the link
register before calling the C vdso function, retrieving the vdso data
pointer there is less overhead.

Split out the functional code from the __cvdso.*() interfaces into new
static functions which can either be called from the existing interfaces
with the vdso data pointer supplied via __arch_get_vdso_data() or directly
from ASM code.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/abf97996602ef07223fec30c005df78e5ed41b2e.1580399657.git.christophe.leroy@c-s.fr
Link: https://lkml.kernel.org/r/20200207124403.965789141@linutronix.de
lib/vdso/gettimeofday.c