From patchwork Sun Nov 17 21:03:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 3194811 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7AFB59F3AE for ; Sun, 17 Nov 2013 21:03:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E14A20584 for ; Sun, 17 Nov 2013 21:03:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D18F20578 for ; Sun, 17 Nov 2013 21:03:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751222Ab3KQVDQ (ORCPT ); Sun, 17 Nov 2013 16:03:16 -0500 Received: from mout.gmx.net ([212.227.15.18]:64230 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983Ab3KQVDP (ORCPT ); Sun, 17 Nov 2013 16:03:15 -0500 Received: from p100.box ([84.173.19.218]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Lusmr-1VZFWy05eT-0101UD for ; Sun, 17 Nov 2013 22:03:14 +0100 Date: Sun, 17 Nov 2013 22:03:11 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley Subject: [PATCH] parisc: do not inline pa_memcpy() Message-ID: <20131117210311.GA2980@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V03:K0:ad7KvzEJC6A0uj4spjZIOKnhAo8AJ+/kfgdA90TZS1zt7d8jeIf kyqc4jpcc9cW+0LvXefDNp/4jdo9u5eSV1GFLrDjUuOMu2t1ZTOFIzxjxoxo6GEHtFwEBQ5 37RPlRnwU7vfwbN3GjEChlCPtkv4wyyTiDRGSnpr4BC4E+6qjlSWdBPz6fgffKgPsTWnw5T EeXLZ2NzrMJGafQmS8sGw== Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;