From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0114.outbound.protection.outlook.com [65.55.169.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id EE7311A028E for ; Wed, 25 Mar 2015 13:10:17 +1100 (AEDT) Message-ID: <1427249404.22867.86.camel@freescale.com> Subject: Re: [PATCH v2 1/2] powerpc32: put csum_tcpudp_magic inline From: Scott Wood To: Christophe Leroy Date: Tue, 24 Mar 2015 21:10:04 -0500 In-Reply-To: <20150203113927.52DA41A5F13@localhost.localdomain> References: <20150203113927.52DA41A5F13@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras , linux-kernel@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2015-02-03 at 12:39 +0100, Christophe Leroy wrote: > csum_tcpudp_magic() is only a few instructions, and does not modifies any other > register than the returned result. So it is not worth having it as a separate > function and suffer function branching and saving of volatile registers. > This patch makes it inline by use of the already existing csum_tcpudp_nofold() > function. > > Signed-off-by: Christophe Leroy > > --- > v2: no change > > arch/powerpc/include/asm/checksum.h | 15 +++++++++++++++ > arch/powerpc/lib/checksum_32.S | 16 ---------------- > 2 files changed, 15 insertions(+), 16 deletions(-) The 64-bit version is pretty similar to the 32-bit -- why only use csum_tcpudp_nofold() on 32-bit? -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752305AbbCYCKP (ORCPT ); Tue, 24 Mar 2015 22:10:15 -0400 Received: from mail-bl2on0105.outbound.protection.outlook.com ([65.55.169.105]:20503 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751840AbbCYCKN (ORCPT ); Tue, 24 Mar 2015 22:10:13 -0400 Message-ID: <1427249404.22867.86.camel@freescale.com> Subject: Re: [PATCH v2 1/2] powerpc32: put csum_tcpudp_magic inline From: Scott Wood To: Christophe Leroy CC: Benjamin Herrenschmidt , Paul Mackerras , , , Joakim Tjernlund Date: Tue, 24 Mar 2015 21:10:04 -0500 In-Reply-To: <20150203113927.52DA41A5F13@localhost.localdomain> References: <20150203113927.52DA41A5F13@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [2601:2:5800:3f7:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: DM2PR10CA0041.namprd10.prod.outlook.com (25.160.213.51) To BLUPR03MB1476.namprd03.prod.outlook.com (25.163.81.18) Authentication-Results: c-s.fr; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1476; X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(377424004)(51704005)(24454002)(62966003)(110136001)(77156002)(23676002)(36756003)(19580405001)(42186005)(122386002)(50226001)(40100003)(46102003)(5820100001)(50986999)(76176999)(92566002)(86362001)(50466002)(33646002)(2950100001)(103116003)(87976001)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR03MB1476;H:[IPv6:2601:2:5800:3f7:12bf:48ff:fe84:c9a0];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:BLUPR03MB1476;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1476; X-Forefront-PRVS: 052670E5A4 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2015 02:10:09.8457 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1476 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-02-03 at 12:39 +0100, Christophe Leroy wrote: > csum_tcpudp_magic() is only a few instructions, and does not modifies any other > register than the returned result. So it is not worth having it as a separate > function and suffer function branching and saving of volatile registers. > This patch makes it inline by use of the already existing csum_tcpudp_nofold() > function. > > Signed-off-by: Christophe Leroy > > --- > v2: no change > > arch/powerpc/include/asm/checksum.h | 15 +++++++++++++++ > arch/powerpc/lib/checksum_32.S | 16 ---------------- > 2 files changed, 15 insertions(+), 16 deletions(-) The 64-bit version is pretty similar to the 32-bit -- why only use csum_tcpudp_nofold() on 32-bit? -Scott