Received: by 10.223.185.116 with SMTP id b49csp2792734wrg; Mon, 12 Feb 2018 15:57:54 -0800 (PST) X-Google-Smtp-Source: AH8x226K8AikUn0TeFIoJgKOXZFm6m2/meLtG69EIb68tI95SWtZ1xvV6QbzUhUcsecLJXFde/G+ X-Received: by 10.99.123.92 with SMTP id k28mr7112622pgn.167.1518479874399; Mon, 12 Feb 2018 15:57:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518479874; cv=none; d=google.com; s=arc-20160816; b=nU/WlkNVfyuN68aoVDhCB8W9EF419T6Z07FH1fQbUvOhDfH3W0wszg2g4vv2fQaYNG h/U4O3lK2msPvCr/epdRC/ez9YDvrHbv5LsAa5Qbgg6d4qbnwisjumW9mxRFea87PCQD OT/EuHA//CIbfZgtNEZiJVJuhRTwVY61EhOVNAGQiNFde1nx6dNX1zVwW2EEZaquaGDX jByAU9lnXsmSjvqrtM9my3ggBTRcqk7uxAwqj11UqrEu909OUAOisFV6eqtm3YkLKIMj kWgEQeZ+c8yemlBGnVwrCWVWrzFYfM9rhp3aRLIK5XBMYX5ag85Q82ka8Al0bgjv2qFg xbbg== 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:dkim-signature:arc-authentication-results; bh=Rg5NeLkwXQ2uamTjxkZwGhA5g32BzL436wa/AHLjcek=; b=tcISZUMRFLRCmcOrIjJFQ0JLZfItZdeUJsLFQbuxrG7Lxe/Xgkz+x8LtuuOJV2tWlJ 5wW2JpNyzLHGpFPcQ5TkrOAy5q0ypQtmbGq8ZmNNHuyDn+WQbwqDjHXvgqnVntyrsyIq yohERtbO8qhQRSm3HLQepRpc9NgjJdu2UcqPPDEcF7bP0eH6RCK3H4GH31m7ep0uWD3a nVcTTtKgv2s+GAh9CVQ5XpIZBrGOErw30LtWnud1ZZh/HnV+wgeu5Y08XEpgUOzAcmzx 9dnw3n/1KjohD8CJeO4+H59k0/4R61EglwC7ngua3tzCT7o7oIsY7KyonAcVD7zllLYR JINg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=P7Jk0pIB; 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 k5si7057563pfj.272.2018.02.12.15.57.39; Mon, 12 Feb 2018 15:57:54 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=P7Jk0pIB; 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 S932805AbeBLX47 (ORCPT + 99 others); Mon, 12 Feb 2018 18:56:59 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:47049 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932735AbeBLX46 (ORCPT ); Mon, 12 Feb 2018 18:56:58 -0500 Received: by mail-pg0-f68.google.com with SMTP id a11so8595214pgu.13 for ; Mon, 12 Feb 2018 15:56:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Rg5NeLkwXQ2uamTjxkZwGhA5g32BzL436wa/AHLjcek=; b=P7Jk0pIBvFK9ezUsC+a7T4q1hLHeolCcsVU28Ie9Szjstp+Uc7tPAPMVAWlsy8rjow LrsvwfW6nURy5RqeBvT5EjrMW48NH7DodtUqKO6lMvWTRxFNClAtboCo7LNaqPBAlgO7 LAWp7tFz5rLqVbeWLx78vXUiKYqCRe6r1dm3no5NHGX2OG63Qo7WdXRprToYxduU+snI qS90qQhl0z+fxPe7AJe9HzTd8WmBm8rjtVsmt31fEKAUUutRS3+lc+DaAWK3a3XZt0Gz 3kyX+3BLN5nMDFvY1LkqZplf4txGqk7fn/9k+Ad3gPZB4lqCTKpe6NEQKsxpSTlngSBK /6KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Rg5NeLkwXQ2uamTjxkZwGhA5g32BzL436wa/AHLjcek=; b=bbqe9TJCzROVzHeWkMELNHe472fu8InQ1HU5MQ1eO8odz/REeGtWPmSVSVSNdLxRtf yDiHL+8yQV+8c26Z+jFxL+z1AxSVuttU8m5JL5F2SYnmemqtL8+iL+25ZNYp7fyWNgJE GpY7v549pKH8qGzEWRVQO5Zv485pCD4v5SB6XXgoAsr2eFP6Huz9Fe2ajNAp5PMgMpSe r2eQhEC5NECTRthODiHgAyyxKkbJTjSyI9X3mMcqfahR47FOW3EjaOF45oXl1zbX3jML Bo4QZU60yT1AQ9/Zy7BiYr1bzpOK5+6f8/pVWgY/UVKY5/ajsPWeF4qZVjJd9R+JjIxb YxLQ== X-Gm-Message-State: APf1xPCcg4mhvV92FvI76k/S3lgcxn3zK8E5S7tUOOW1OFZ6lyDuv4Sz 6DBiB7+gQU0hgbT4pH9qpQ0= X-Received: by 10.98.226.22 with SMTP id a22mr12671452pfi.24.1518479817488; Mon, 12 Feb 2018 15:56:57 -0800 (PST) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id a28sm25721405pfe.70.2018.02.12.15.56.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 15:56:56 -0800 (PST) Date: Mon, 12 Feb 2018 15:56:55 -0800 From: Guenter Roeck To: James Hogan Cc: Ralf Baechle , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Alice Michael , Jeff Kirsher , Shannon Nelson Subject: Re: [RFC PATCH] MIPS: Provide cmpxchg64 for 32-bit builds Message-ID: <20180212235655.GC5199@roeck-us.net> References: <1518475021-3337-1-git-send-email-linux@roeck-us.net> <20180212234201.GB4290@saruman> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180212234201.GB4290@saruman> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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