Merge branch 'master' into svm
This commit is contained in:
commit
016c4a1227
5 changed files with 19 additions and 11 deletions
|
@ -41,9 +41,8 @@
|
|||
|
||||
void* iRCCE_memcpy_get(void *dest, const void *src, size_t count)
|
||||
{
|
||||
#ifdef COPPERRIDGE
|
||||
#if defined(COPPERRIDGE) || defined(SCC)
|
||||
return memcpy_get(dest, src, count);
|
||||
//return memcpy_from_mpb(dest, src, count);
|
||||
#else
|
||||
return memcpy(dest, src, count);
|
||||
#endif
|
||||
|
|
|
@ -41,9 +41,8 @@
|
|||
|
||||
void* iRCCE_memcpy_put(void *dest, const void *src, size_t count)
|
||||
{
|
||||
#ifdef COPPERRIDGE
|
||||
#if defined(COPPERRIDGE) || defined(SCC)
|
||||
return memcpy_put(dest, src, count);
|
||||
//return memcpy_to_mpb(dest, src, count);
|
||||
#else
|
||||
return memcpy(dest, src, count);
|
||||
#endif
|
||||
|
|
|
@ -71,7 +71,23 @@ inline static void *memcpy_get(void *dest, const void *src, size_t count)
|
|||
* In our kernel, we didn't want to use FPU registers.
|
||||
* Therefore, we use standard memcpy routine
|
||||
*/
|
||||
#define memcpy_put memcpy
|
||||
inline static void *memcpy_put(void* dest, const void *src, size_t count)
|
||||
{
|
||||
int32_t i, j, k;
|
||||
|
||||
if (BUILTIN_EXPECT(!dest || !src, 0))
|
||||
return dest;
|
||||
|
||||
asm volatile (
|
||||
"cld; rep movsl\n\t"
|
||||
"movl %4, %%ecx\n\t"
|
||||
"andl $3, %%ecx\n\t"
|
||||
"rep movsb\n\t"
|
||||
: "=&c"(i), "=&D"(j), "=&S"(k)
|
||||
: "0"(count/4), "g"(count), "1"(dest), "2"(src) : "memory");
|
||||
|
||||
return dest;
|
||||
}
|
||||
#else
|
||||
/*
|
||||
* If the destination is located on on-die memory (MPB), classical prefetching
|
||||
|
|
|
@ -85,10 +85,8 @@ typedef struct task {
|
|||
uint32_t start_heap;
|
||||
/// End address of the heap
|
||||
uint32_t end_heap;
|
||||
#ifdef CONFIG_LWIP
|
||||
/// LwIP error code
|
||||
int lwip_err;
|
||||
#endif
|
||||
/// Mail inbox
|
||||
mailbox_wait_msg_t inbox;
|
||||
/// Mail outbox array
|
||||
|
|
|
@ -243,9 +243,7 @@ static int create_task(tid_t* id, internal_entry_point_t ep, void* arg)
|
|||
|
||||
task_table[i].start_heap = 0;
|
||||
task_table[i].end_heap = 0;
|
||||
#ifdef CONFIG_LWIP
|
||||
task_table[i].lwip_err = 0;
|
||||
#endif
|
||||
task_table[i].start_tick = get_clock_tick();
|
||||
break;
|
||||
}
|
||||
|
@ -311,9 +309,7 @@ int sys_fork(void)
|
|||
task_table[i].start_tick = get_clock_tick();
|
||||
task_table[i].start_heap = 0;
|
||||
task_table[i].end_heap = 0;
|
||||
#ifdef CONFIG_LWIP
|
||||
task_table[i].lwip_err = 0;
|
||||
#endif
|
||||
|
||||
ret = arch_fork(task_table+i);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue