Received: by 10.223.148.5 with SMTP id 5csp8018866wrq; Thu, 18 Jan 2018 12:31:17 -0800 (PST) X-Google-Smtp-Source: ACJfBotFcryv4/2xIhpguhFscol9ie5ZEvNjGiXxqQAF/HpbQfS+//bRQEgCwymUQUO989hsXm6p X-Received: by 2002:a17:902:47:: with SMTP id 65-v6mr370230pla.282.1516307477749; Thu, 18 Jan 2018 12:31:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516307477; cv=none; d=google.com; s=arc-20160816; b=SdoPEGqzUiNAKVHuua65pV0CmqxtRXW5WkVe+xvYabRCqyS76sh/ssnSkQzfGYAYua GLDIpxbgaHn251/3H4FPe5lLWO4MAwQZyByzvBA0317B9n5CA0XnsCPNgfGrTBNrprnL Mt8dYCzSpyRTNPs0r3OR+QjkRSLE1Ds2JKue7OfzPBBmZUqI/IKTLu/UtO3f8jc5J2C3 /KBoDvvPyd6KdGjBmiZbmInmWq+St7/6yeGZzrrIZ1Vt6X5wW6jU1wnETnPpEufd064E tQ2f+MfTYMwpys+PARgoGW5m2gsbOxTTjAoBQt2r2cStENFWx2jU+ZWlwgd02CmP0/3K 4Uhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=AVf6Vy92P6y6H5a6HbMFcPaIjx5hQLxvfGfMiapl4eI=; b=BS7G017JNzQPG3h5Iqn5VFHbjI1btushoRVe1GB31WiPrW7R75y9qalEV6/bW4+SmG fS4jVLzS49N9V32Aay8P8gts/u3F0Gf2tQsAlME7ypJXGjG3tE8i8qbpyfaRjpq5yv+s efKpY9JGeRTA1bJwaLfNsw/TfTBdlC6ks6NMIDjovA+rzPVJTLpq5YrPoCV5d3CmvuCu 6NruXTjRsBDVKEeTdTS8uf2oS7K6q0fYE7ZG38/XziB8SV8Xqtswb4+0kziwCcq8cum9 tH8/E3Qmw1AU40e3bBB50mRmIFOEoFTy19nzq2fUxz58hr+wJeiGJIQ3W8q67m5pgKq8 36ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7-v6si184287plr.828.2018.01.18.12.31.00; Thu, 18 Jan 2018 12:31:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932884AbeARUa0 (ORCPT + 99 others); Thu, 18 Jan 2018 15:30:26 -0500 Received: from 9pmail.ess.barracuda.com ([64.235.154.211]:43717 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932322AbeARUaZ (ORCPT ); Thu, 18 Jan 2018 15:30:25 -0500 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx1403.ess.rzc.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Thu, 18 Jan 2018 20:29:47 +0000 Received: from localhost (192.168.154.110) by MIPSMAIL01.mipstec.com (10.20.43.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 18 Jan 2018 12:28:38 -0800 Date: Thu, 18 Jan 2018 20:28:36 +0000 From: James Hogan To: Antony Pavlov CC: Matt Redfearn , Palmer Dabbelt , , , Ralf Baechle Subject: Re: [PATCH] MIPS: use generic GCC library routines from lib/ Message-ID: <20180118202835.GE27409@jhogan-linux.mipstec.com> References: <20180117065121.30437-1-antonynpavlov@gmail.com> <20180117090348.GA20406@mredfearn-linux> <20180117163418.ba77b2f72298092fb843fda7@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FMJTF8LVhUQkvsEb" Content-Disposition: inline In-Reply-To: <20180117163418.ba77b2f72298092fb843fda7@gmail.com> User-Agent: Mutt/1.7.2 (2016-11-26) X-Originating-IP: [192.168.154.110] X-BESS-ID: 1516307384-321459-31040-6010-9 X-BESS-VER: 2017.17-r1801171719 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.60 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.189121 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.60 MARKETING_SUBJECT HEADER: Subject contains popular marketing words X-BESS-Outbound-Spam-Status: SCORE=0.60 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, MARKETING_SUBJECT X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --FMJTF8LVhUQkvsEb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 17, 2018 at 04:34:18PM +0300, Antony Pavlov wrote: > On Wed, 17 Jan 2018 09:03:48 +0000 > Matt Redfearn wrote: >=20 > > Hi, > >=20 > > On Wed, Jan 17, 2018 at 09:51:21AM +0300, Antony Pavlov wrote: > > > The commit b35cd9884fa5 ("lib: Add shared copies of > > > some GCC library routines") makes it possible > > > to share generic GCC library routines by several > > > architectures. > > >=20 > > > This commit removes several generic GCC library > > > routines from arch/mips/lib/ in favour of similar > > > routines from lib/. > > >=20 > > > Signed-off-by: Antony Pavlov > > > Cc: Palmer Dabbelt > > > Cc: Ralf Baechle > > > Cc: linux-mips@linux-mips.org > > > Cc: linux-kernel@vger.kernel.org > > > --- > > > arch/mips/Kconfig | 5 +++++ > > > arch/mips/lib/Makefile | 2 +- > > > arch/mips/lib/ashldi3.c | 30 ------------------------------ > > > arch/mips/lib/ashrdi3.c | 32 -------------------------------- > > > arch/mips/lib/cmpdi2.c | 28 ---------------------------- > > > arch/mips/lib/lshrdi3.c | 30 ------------------------------ > > > arch/mips/lib/ucmpdi2.c | 22 ---------------------- > > > 7 files changed, 6 insertions(+), 143 deletions(-) > > > delete mode 100644 arch/mips/lib/ashldi3.c > > > delete mode 100644 arch/mips/lib/ashrdi3.c > > > delete mode 100644 arch/mips/lib/cmpdi2.c > > > delete mode 100644 arch/mips/lib/lshrdi3.c > > > delete mode 100644 arch/mips/lib/ucmpdi2.c > > >=20 > > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > > > index 350a990fc719..9cd49ee848c6 100644 > > > --- a/arch/mips/Kconfig > > > +++ b/arch/mips/Kconfig > > > @@ -73,6 +73,11 @@ config MIPS > > > select RTC_LIB if !MACH_LOONGSON64 > > > select SYSCTL_EXCEPTION_TRACE > > > select VIRT_TO_BUS > > > + select GENERIC_ASHLDI3 > > > + select GENERIC_ASHRDI3 > > > + select GENERIC_LSHRDI3 > > > + select GENERIC_CMPDI2 > > > + select GENERIC_UCMPDI2 > >=20 > > Please preserve alphabetical order >=20 > Ok, I'll fix order in v2 patch. >=20 > > > --- a/arch/mips/lib/ucmpdi2.c > > > +++ /dev/null > > > @@ -1,22 +0,0 @@ > > > -// SPDX-License-Identifier: GPL-2.0 > > > -#include > > > - > > > -#include "libgcc.h" > > > - > > > -word_type notrace __ucmpdi2(unsigned long long a, unsigned long long= b) > >=20 > > The version of __ucmpdi2 in /lib/ is not marked notrace. We have seen > > issues before with compiler intrinsics not being marked notrace - see > > aedcfbe06558 ("MIPS: lib: Mark intrinsics notrace") > >=20 > > Please ensure that the /lib/ version is equivalent before switching to > > that version. >=20 > Good shot! I have missed this 'notrace'. >=20 > lib/ucmpdi2.c differ from other GCC library routines files from lib > related to my patch (ashldi3.c, ashrdi3.c, cmpdi2.c, lshrdi3.c): > only lib/ucmpdi2.c has no 'notrace' flag. In other details the files > look equivalent. The files arch/mips/lib/libgcc.h and include/linux/libgc= c.h > have no fundamental differences. >=20 > to Palmer: > Can we add notrace to lib/ucmpdi2.c? FWIW, with both matt's comments addressed: Reviewed-by: James Hogan Cheers James > It looks like that nobody (even RISC-V code) > uses GENERIC_CMPDI2 and GENERIC_UCMPDI2. Why? > Do you use them in your local branches? >=20 > --=20 > Best regards, > =C2=A0 Antony Pavlov >=20 --FMJTF8LVhUQkvsEb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlphA3MACgkQbAtpk944 dnpMrBAAiEjWKmQtyKQcgFLZmCeARd8M4ObVE0Lfw2FfhcYoGg4m9BWIx1kuW06J WfwQgYnpDohKfNwjywG+lDKXlv8le1WiPpBc/T6kZaA8W1QT08dL7CGIjJCoA8tk YTI2sb3uC7EI+v6qwXUhSkFm+WLIjrhYtwFveMuGnPrTKOWW6ZPnQgldpeGdYGAp nVOR9fEerslyYMx6S9dlwNGHmLAxIptqMRQc2MU20qZnu4PqcNAenfj0CkYnn2pB sAiAglVTKtrGgLE5Wldq4VmDU4M/f5wPgvA3+agrSTgPMacWwfjfw2rNts0WNsp9 vxp5XJLoGV51XDUdAZq6TL+wPF2FCXWH4T2B3yzzTRs+po2l5TlbqNWhY8+FSYun T59O7dWSwjKcuMxcjj4tAaJlVOXH5TsJ+X7IFEt/HWu4V1tcbOX5sbsHrO2yp6du TWNaYW3X+0yd1BaYe1Uu13phDAFXfr0ibIkf96NzsAB/0EpcARmn+cCzcGmv//dO NotF+URwySXq0buZWf4cntPZ7j1Vrmem2Z9h9Envv2ViaihRO5h0Ym10qsCJCnQ0 RLCm/mHREGKTTdB7fQpqfmPI7gDYQfALzwWGYUgYfFCza029v7C4Jyhls2OYUbQJ YLX8h2Mazld0ScbsHu4t2DpzEDk/MKSLBLzL+plJwDQ2390kz5M= =8Dsf -----END PGP SIGNATURE----- --FMJTF8LVhUQkvsEb--