Commit 1ad78171 authored by Laurent Dufour's avatar Laurent Dufour Committed by Pavel Emelyanov

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: 's avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 450fadb5
......@@ -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
......
......@@ -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__ */
......@@ -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)
......
......@@ -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" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment