2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-01 06:45:35 +00:00

ppc64: crtools no more use builtin mem operation

Since crtools is no more linked with object build for the
parasite/restorer blob, it no more needs the builtin memory services.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Laurent Dufour
2015-10-15 18:20:00 +03:00
committed by Pavel Emelyanov
parent 450fadb561
commit 1ad78171ad
4 changed files with 13 additions and 16 deletions

View File

@@ -6,7 +6,6 @@ SYS-ASM := syscalls.S
syscalls-asm-y += $(SYS-ASM:.S=).o
crtools-obj-y += crtools.o
crtools-obj-y += cpu.o
crtools-asm-y += memcpy_power7.o memcmp_64.o
SYS-DEF := syscall-ppc64.def
SYS-ASM-COMMON := syscall-common-ppc64.S

View File

@@ -8,6 +8,7 @@
#include "asm-generic/string.h"
#ifdef CR_NOGLIBC
extern void memcpy_power7(void *to, const void *from, unsigned long n);
static inline void *builtin_memcpy(void *to, const void *from, unsigned long n)
{
@@ -15,7 +16,13 @@ static inline void *builtin_memcpy(void *to, const void *from, unsigned long n)
memcpy_power7(to, from, n);
return to;
}
extern int builtin_memcmp(const void *cs, const void *ct, size_t count);
#else
/*
* When building with the C library, call its services
*/
#define builtin_memcpy memcpy
#define builtin_memcmp memcmp
#endif
#endif /* __CR_ASM_STRING_H__ */

View File

@@ -23,6 +23,11 @@
*/
#include "asm/linkage.h"
/*
* When building the parasite code, the compiler may rely on the C library
* service memcpy to initialise big local variable in the stack.
*/
ENTRY(memcpy)
ENTRY(memcpy_power7)
cmpldi r5,16
std r3,-STACKFRAMESIZE+STK_REG(R31)(r1)

View File

@@ -16,20 +16,6 @@
/* This symbols are defined in vdso-trampoline.S */
extern char *vdso_trampoline, *vdso_trampoline_end;
/*
* When building the parasite code, the compiler may rely on the C library
* service memcpy to initialise big local variable in the stack.
* Since we are not linked with the C library, we have to remap this service
* to the builtin one we are using.
* Note this cannot be done through macro since the compiler is creating the
* memcpy call in our back. So we have to define a *real* symbol.
*/
void *memcpy(void *to, const void *from, unsigned long n)
{
return builtin_memcpy(to, from, n);
}
static inline void invalidate_caches(unsigned long at)
{
asm volatile("isync \n" \