mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-29 19:49:10 +00:00
powerpc/vdso32: Add crtsavres
Commit 08c18b63d9
("powerpc/vdso32: Add missing _restgpr_31_x to fix
build failure") added _restgpr_31_x to the vdso for gettimeofday, but
the work on getrandom shows that we will need more of those functions.
Remove _restgpr_31_x and link in crtsavres.o so that we get all
save/restore functions when optimising the kernel for size.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
d175ee98fe
commit
b163596a5b
@ -43,6 +43,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
targets := $(obj-vdso32) vdso32.so.dbg vgettimeofday-32.o
|
targets := $(obj-vdso32) vdso32.so.dbg vgettimeofday-32.o
|
||||||
|
targets += crtsavres-32.o
|
||||||
obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
|
obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
|
||||||
targets += $(obj-vdso64) vdso64.so.dbg vgettimeofday-64.o
|
targets += $(obj-vdso64) vdso64.so.dbg vgettimeofday-64.o
|
||||||
obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
|
obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
|
||||||
@ -68,7 +69,7 @@ targets += vdso64.lds
|
|||||||
CPPFLAGS_vdso64.lds += -P -C
|
CPPFLAGS_vdso64.lds += -P -C
|
||||||
|
|
||||||
# link rule for the .so file, .lds has to be first
|
# link rule for the .so file, .lds has to be first
|
||||||
$(obj)/vdso32.so.dbg: $(obj)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday-32.o FORCE
|
$(obj)/vdso32.so.dbg: $(obj)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday-32.o $(obj)/crtsavres-32.o FORCE
|
||||||
$(call if_changed,vdso32ld_and_check)
|
$(call if_changed,vdso32ld_and_check)
|
||||||
$(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o FORCE
|
$(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o FORCE
|
||||||
$(call if_changed,vdso64ld_and_check)
|
$(call if_changed,vdso64ld_and_check)
|
||||||
@ -76,6 +77,8 @@ $(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o
|
|||||||
# assembly rules for the .S files
|
# assembly rules for the .S files
|
||||||
$(obj-vdso32): %-32.o: %.S FORCE
|
$(obj-vdso32): %-32.o: %.S FORCE
|
||||||
$(call if_changed_dep,vdso32as)
|
$(call if_changed_dep,vdso32as)
|
||||||
|
$(obj)/crtsavres-32.o: %-32.o: $(srctree)/arch/powerpc/lib/crtsavres.S FORCE
|
||||||
|
$(call if_changed_dep,vdso32as)
|
||||||
$(obj)/vgettimeofday-32.o: %-32.o: %.c FORCE
|
$(obj)/vgettimeofday-32.o: %-32.o: %.c FORCE
|
||||||
$(call if_changed_dep,vdso32cc)
|
$(call if_changed_dep,vdso32cc)
|
||||||
$(obj-vdso64): %-64.o: %.S FORCE
|
$(obj-vdso64): %-64.o: %.S FORCE
|
||||||
|
@ -118,16 +118,3 @@ V_FUNCTION_END(__kernel_clock_getres)
|
|||||||
V_FUNCTION_BEGIN(__kernel_time)
|
V_FUNCTION_BEGIN(__kernel_time)
|
||||||
cvdso_call __c_kernel_time call_time=1
|
cvdso_call __c_kernel_time call_time=1
|
||||||
V_FUNCTION_END(__kernel_time)
|
V_FUNCTION_END(__kernel_time)
|
||||||
|
|
||||||
/* Routines for restoring integer registers, called by the compiler. */
|
|
||||||
/* Called with r11 pointing to the stack header word of the caller of the */
|
|
||||||
/* function, just beyond the end of the integer restore area. */
|
|
||||||
#ifndef __powerpc64__
|
|
||||||
_GLOBAL(_restgpr_31_x)
|
|
||||||
_GLOBAL(_rest32gpr_31_x)
|
|
||||||
lwz r0,4(r11)
|
|
||||||
lwz r31,-4(r11)
|
|
||||||
mtlr r0
|
|
||||||
mr r1,r11
|
|
||||||
blr
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user