Skip to contentSkip to conversation

parisc: do not inline pa_memcpy()

PATCH New Helge Deller 1 participant 1 message Nov 17, 2013 PA-RISC architecture

lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 1/1 parisc: do not inline pa_memcpy()

gcc (4.8.x) creates wrong code when pa_memcpy() is inlined. Especially in 32bit builds it calculates wrong return values if we encounter a fault during execution of the memcpy.

arch/parisc/lib/memcpy.c +1 -1
index b5507ec..e2285e1 100644
@@ -460,7 +460,7 @@ handle_store_error:
 
 
 /* Returns 0 for success, otherwise, returns number of bytes not transferred. */
-static unsigned long pa_memcpy(void *dstp, const void *srcp, unsigned long len)
+static noinline unsigned long pa_memcpy(void *dstp, const void *srcp, unsigned long len)
 {
 	unsigned long ret, fault_addr, reference;
 	struct exception_data *d;