Received: by 10.223.185.116 with SMTP id b49csp1225232wrg; Wed, 14 Feb 2018 13:38:31 -0800 (PST) X-Google-Smtp-Source: AH8x224Ixkl428GulGsmA8PxtWroPsSVBkph+SBU35NmEfojkaRguyf2zqfYoyEnmb06x+XJeIG9 X-Received: by 10.101.89.6 with SMTP id f6mr365458pgu.22.1518644311794; Wed, 14 Feb 2018 13:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518644311; cv=none; d=google.com; s=arc-20160816; b=M+KMdRbLyuox6DYOvvrR6TzhsdmZdLOGKomTMGdixhJ2vx1Qz1m/7IlKm4lPVxtfTq JVj5Y7+dDxPVGskOcz3KS94MsS4EjPs1im0ViuC/cDowzwdIH0M5VUpk0cIyulIvjJW/ acsUflbgOQRJ61o01vguvptc0OyuqFUjwWCAjlXTgYD83dwAJKoB/7B+h3x8QxnP6Mqf On0fjOqH3tSdQ2+HoG4+pS+AxbCQys6JJeuOQsw/OtwdXsjR/ZbIm2QzXBmZuLIFOo3U M0EUZsNrBQwTaw8U6L5vqj2stfVXGZ4KphpeDJzQLsIi/yrdOoEuBLZlK5DXTTpNjdTS i52A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=bvL1G45c2bGwKooQqgIxJEAKiW1PkWSviEA2j9aDy7A=; b=Z43zoWxNGbeLgwiMTKjNi49KGly65OzSldMiJ4+oAP9vbqBUEfqS1nOR1nbEOyUsmm 4N12HeKi7U34elcRW0h0V7iW8mY3tVUu1juVPTHesYaw8E51UBc683y2f80gAnzD6+0N jIXTdT3kmwUdSlbe0V8GcGYpjkzcMn0EsmmpoVW2umzCpNlP0qAKfFUjgx5hLm37iLvI fJdi/cVNA+7y6ruSHbblOa5Hbb712Hoe86n75ffLC+opeQV/LvSt9cDIMDULGxCHDcNP gE/KRQU8hmwWf6ZAyHYzpHwvJsUuwSjeC9rt7PN3BWs+Hcl7Jbk52mq3mJoClsZKxSC+ cxGg== 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 16si3013709pgf.181.2018.02.14.13.38.17; Wed, 14 Feb 2018 13:38:31 -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 S1031536AbeBNVgg convert rfc822-to-8bit (ORCPT + 99 others); Wed, 14 Feb 2018 16:36:36 -0500 Received: from mga14.intel.com ([192.55.52.115]:58793 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030501AbeBNVgf (ORCPT ); Wed, 14 Feb 2018 16:36:35 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2018 13:36:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,514,1511856000"; d="scan'208";a="17700445" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga007.jf.intel.com with ESMTP; 14 Feb 2018 13:36:34 -0800 Received: from orsmsx115.amr.corp.intel.com ([169.254.4.94]) by ORSMSX106.amr.corp.intel.com ([169.254.1.97]) with mapi id 14.03.0319.002; Wed, 14 Feb 2018 13:36:34 -0800 From: "Keller, Jacob E" To: "Michael, Alice" , Guenter Roeck , James Hogan CC: Ralf Baechle , "linux-mips@linux-mips.org" , "linux-kernel@vger.kernel.org" , "Kirsher, Jeffrey T" , Shannon Nelson Subject: RE: [RFC PATCH] MIPS: Provide cmpxchg64 for 32-bit builds Thread-Topic: [RFC PATCH] MIPS: Provide cmpxchg64 for 32-bit builds Thread-Index: AQHTpFslw+crNM24eUSynxqRPTqrYKOh97eAgAJsOTCAAArEUA== Date: Wed, 14 Feb 2018 21:36:33 +0000 Message-ID: <02874ECE860811409154E81DA85FBB5882CDAA1C@ORSMSX115.amr.corp.intel.com> References: <1518475021-3337-1-git-send-email-linux@roeck-us.net> <20180212234201.GB4290@saruman> <20180212235655.GC5199@roeck-us.net> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTVjMjhjNTYtNmM5Yi00OTY2LTk5ODAtNTUwN2U5OWE4Y2QxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjBOeFJXTHdRV0ZcLzVsN0NXNkhEQkZ3dnVqU2F1VW9IcVM1ZmJLb0ZROU40PSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Michael, Alice > Sent: Wednesday, February 14, 2018 1:03 PM > To: Guenter Roeck ; James Hogan ; > Keller, Jacob E > Cc: Ralf Baechle ; linux-mips@linux-mips.org; linux- > kernel@vger.kernel.org; Kirsher, Jeffrey T ; Shannon > Nelson > Subject: RE: [RFC PATCH] MIPS: Provide cmpxchg64 for 32-bit builds > > As has previously been said, we're going to be removing the need for cmpxchg64. > But it takes a little bit of time and work to do so. I'm adding the dev that is taking > care of the work back onto this email thread as well so he can see any concerns with > it. > > Alice > > -----Original Message----- > From: Guenter Roeck [mailto:groeck7@gmail.com] On Behalf Of Guenter Roeck > Sent: Monday, February 12, 2018 3:57 PM > To: James Hogan > Cc: Ralf Baechle ; linux-mips@linux-mips.org; linux- > kernel@vger.kernel.org; Michael, Alice ; Kirsher, Jeffrey T > ; Shannon Nelson > Subject: Re: [RFC PATCH] MIPS: Provide cmpxchg64 for 32-bit builds > > On Mon, Feb 12, 2018 at 11:42:02PM +0000, James Hogan wrote: > > Hi Guenter, > > > > On Mon, Feb 12, 2018 at 02:37:01PM -0800, Guenter Roeck wrote: > > > Since commit 60f481b970386 ("i40e: change flags to use 64 bits"), > > > the i40e driver uses cmpxchg64(). This causes mips:allmodconfig > > > builds to fail with > > > > > > drivers/net/ethernet/intel/i40e/i40e_ethtool.c: > > > In function 'i40e_set_priv_flags': > > > drivers/net/ethernet/intel/i40e/i40e_ethtool.c:4443:2: error: > > > implicit declaration of function 'cmpxchg64' > > > > > > Implement a poor-mans-version of cmpxchg64() to fix the problem for > > > 32-bit mips builds. The code is derived from sparc32, but only uses > > > a single spinlock. > > > > Will this be implemened for all 32-bit architectures which are > > currently missing cmpxchg64()? > > > No idea. > > > If so, any particular reason not to do it in generic code? > > > Again, no idea. When the problem was previously seen on sparc32, it was > implemented there. > > > If not then I think that driver should be fixed to either depend on > > some appropriate Kconfig symbol or to not use this API since it > > clearly isn't portable at the moment. > > > Good point. > > > See also Shannon's comment about that specific driver: > > https://lkml.kernel.org/r/e7c934d7-e5f4-ee1b-0647-c31a98d9e944@oracle. > > com > > > > Well, this was an RFC only. Feel free to ignore it. > > FWIW, this is the second time that the call was introduced in the i40 driver. > After the first time the code was rewritten to avoid the problem, but now it came > back. Someone must really like it ;-). For my part, I may just blacklist the offending > driver in my builds; that is less than perfect, but much easier than having to deal with > the same problem over and over again. Guess I'll wait for a while and do just that if > the problem isn't fixed in a later RC. > > Guenter Hi, I've been working on re-writing some of the code so that the need for a compare-and-exchange in the i40e_set_priv_flags() is not necessary. This mostly involved moving many flags out into an atomic bitops field instead, it should be posted to IWL soon. Thanks, Jake