vdso: share the vDSO proxy initialization between all architectures

This patch splits the file arch/x86/vdso.c into machine-independent
and machine-dependent parts by moving the routine vdso_init()
from the file vdso.c. The routine seems to be suitable for all
architectures supporting the vDSO.

The ARM version of the routine is moved to the source vdso-stub.c
that is supposed to be the vDSO proxy stub implementation for
architectures that don't provide the vDSO. The build scripts are
adjusted as well to enable selection between the full-fledged
and stub vDSO proxy implementations.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Looks-good-to: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Alexander Kartashov 2014-03-18 21:14:11 +04:00 committed by Pavel Emelyanov
parent 7c42c9b5b6
commit 9e6a062c43
6 changed files with 93 additions and 57 deletions

View file

@ -35,6 +35,8 @@ OBJCOPY := $(CROSS_COMPILE)objcopy
CFLAGS += $(USERCFLAGS)
VDSO_O := vdso.o
#
# Fetch ARCH from the uname if not yet set
#
@ -69,6 +71,8 @@ ifeq ($(shell echo $(ARCH) | sed -e 's/arm.*/arm/'),arm)
ifeq ($(ARMV),7)
USERCFLAGS += -march=armv7-a
endif
VDSO_O := vdso-stub.o
endif
SRCARCH ?= $(ARCH)
@ -117,6 +121,7 @@ CRIU-INC := lib/criu.h include/criu-plugin.h include/criu-log.h protobuf/rpc.pro
export CC MAKE CFLAGS LIBS SRCARCH DEFINES MAKEFLAGS CRIU-SO
export SRC_DIR SYSCALL-LIB SH RM ARCH_DIR OBJCOPY LDARCH LD
export cflags-y
export VDSO_O
include Makefile.inc
include Makefile.config