* [PATCH] parisc: do not inline pa_memcpy()
@ 2013-11-17 21:03 Helge Deller
0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2013-11-17 21:03 UTC (permalink / raw)
To: linux-parisc, James Bottomley
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.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c
index b5507ec..e2285e1 100644
--- a/arch/parisc/lib/memcpy.c
+++ b/arch/parisc/lib/memcpy.c
@@ -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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-17 21:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-17 21:03 [PATCH] parisc: do not inline pa_memcpy() Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).