提交 9af63aed 编写于 作者: H Helge Deller

parisc: do not inline pa_memcpy() internal functions

gcc (4.8.x) creates wrong code when the pa_memcpy() functions are
inlined.  Especially in 32bit builds it calculates wrong return values
if we encounter a fault during execution of the memcpy.
Signed-off-by: NHelge Deller <deller@gmx.de>
上级 a0ffa8f0
...@@ -161,7 +161,7 @@ static inline void prefetch_dst(const void *addr) ...@@ -161,7 +161,7 @@ static inline void prefetch_dst(const void *addr)
/* Copy from a not-aligned src to an aligned dst, using shifts. Handles 4 words /* Copy from a not-aligned src to an aligned dst, using shifts. Handles 4 words
* per loop. This code is derived from glibc. * per loop. This code is derived from glibc.
*/ */
static inline unsigned long copy_dstaligned(unsigned long dst, static noinline unsigned long copy_dstaligned(unsigned long dst,
unsigned long src, unsigned long len) unsigned long src, unsigned long len)
{ {
/* gcc complains that a2 and a3 may be uninitialized, but actually /* gcc complains that a2 and a3 may be uninitialized, but actually
...@@ -276,7 +276,7 @@ static inline unsigned long copy_dstaligned(unsigned long dst, ...@@ -276,7 +276,7 @@ static inline unsigned long copy_dstaligned(unsigned long dst,
/* Returns PA_MEMCPY_OK, PA_MEMCPY_LOAD_ERROR or PA_MEMCPY_STORE_ERROR. /* Returns PA_MEMCPY_OK, PA_MEMCPY_LOAD_ERROR or PA_MEMCPY_STORE_ERROR.
* In case of an access fault the faulty address can be read from the per_cpu * In case of an access fault the faulty address can be read from the per_cpu
* exception data struct. */ * exception data struct. */
static unsigned long pa_memcpy_internal(void *dstp, const void *srcp, static noinline unsigned long pa_memcpy_internal(void *dstp, const void *srcp,
unsigned long len) unsigned long len)
{ {
register unsigned long src, dst, t1, t2, t3; register unsigned long src, dst, t1, t2, t3;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册