Skip to content

Commit

Permalink
arch: memcpy: using memcpy instead of __vec_memcpy
Browse files Browse the repository at this point in the history
Using simple memcpy function in arch_memcpy_s() since
preemption of __vec_memcpy() causes wrong memory reading.

Signed-off-by: Bartosz Kokoszko <[email protected]>
  • Loading branch information
bkokoszx authored and jajanusz committed Apr 29, 2019
1 parent be1331a commit e4a9f86
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/arch/xtensa/include/arch/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ static inline int arch_memcpy_s(void *dest, size_t dest_size,

if (src_size > dest_size)
return -EINVAL;
#if __XCC__ && !CONFIG_HOST
__vec_memcpy(dest, src, src_size);
#else

/* can't be use until full context switch will be supported */
/* #if __XCC__ && !CONFIG_HOST
* __vec_memcpy(dest, src, src_size);
* #else
*/
memcpy(dest, src, src_size);
#endif
/* #endif */

return 0;
}

Expand Down

0 comments on commit e4a9f86

Please sign in to comment.