From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: [net-next,06/15] i40e: change flags to use 64 bits Date: Wed, 7 Feb 2018 15:09:07 +0000 Message-ID: <20180207150907.GB5092@saruman> References: <20180126212459.4246-7-jeffrey.t.kirsher@intel.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hHWLQfXTYDoKhP50" Cc: davem@davemloft.net, Alice Michael , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, jogreene@redhat.com, Ralf Baechle , linux-mips@linux-mips.org To: Jeff Kirsher Return-path: Received: from mail.kernel.org ([198.145.29.99]:56644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754184AbeBGPJN (ORCPT ); Wed, 7 Feb 2018 10:09:13 -0500 Content-Disposition: inline In-Reply-To: <20180126212459.4246-7-jeffrey.t.kirsher@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: --hHWLQfXTYDoKhP50 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 26, 2018 at 01:24:50PM -0800, Jeff Kirsher wrote: > From: Alice Michael >=20 > As we have added more flags, we need to now use more > bits and have over flooded the 32 bit size. So > make it 64. >=20 > Also change all the existing bits to unsigned long long > bits. >=20 > Signed-off-by: Alice Michael > Tested-by: Andrew Bowers > Signed-off-by: Jeff Kirsher > --- > drivers/net/ethernet/intel/i40e/i40e.h | 67 +++++++++++++-------= ------ > drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 +- > 2 files changed, 36 insertions(+), 35 deletions(-) =2E.. > @@ -4323,7 +4323,7 @@ static int i40e_set_priv_flags(struct net_device *d= ev, u32 flags) > * originally. We'll just punt with an error and log something in the > * message buffer. > */ > - if (cmpxchg(&pf->flags, orig_flags, new_flags) !=3D orig_flags) { > + if (cmpxchg64(&pf->flags, orig_flags, new_flags) !=3D orig_flags) { This breaks allyesconfig builds on certain architectures, for example MIPS 32-bit with SMP enabled, which doesn't support cmpxchg64: CC drivers/net/ethernet/intel/i40e/i40e_ethtool.o =20 drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function =E2=80=98i40e_s= et_priv_flags=E2=80=99: drivers/net/ethernet/intel/i40e/i40e_ethtool.c:4326:6: error: implicit decl= aration of function =E2=80=98cmpxchg64=E2=80=99; did you mean =E2=80=98__cm= pxchg=E2=80=99? [-Werror=3Dimplicit-function-declaration] if (cmpxchg64(&pf->flags, orig_flags, new_flags) !=3D orig_flags) { ^~~~~~~~~ =20 __cmpxchg =20 Should the driver now depend on 64BIT or something? Cheers James --hHWLQfXTYDoKhP50 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlp7FowACgkQbAtpk944 dnpISw/+KJSNpWcMAm9Ofcr1CoLgRIGHKoMrOsJ2ee4Gmc6NCwY7Zt2dxemT6MFH XaJL+WAEm7pCjFhdzzfOcXC4pZ+iMhf42MP+FWQ3k2AncYOtg3PAIjAloXyMKht3 Y1NWgMfNIbZoqZm4Q0XfVNISuIs2encNJLMe+pQOPVMnBcA2TwNVxsc6LwFOQq8P a2/AZKu2f4PN/MkAMJXoL3L1wcCdaN7+yK3lpsdVQFka7NT3CpCyDUdtV6pmytef Y/DCdt3sfGVBxa4Em3HVllykN2qcbQrdLZ2/8tYD7eq8HrCRgQFj4rzOAnb/CRgP d2y0P6k6uw2S9dycH/F4pL9qUqMWnk2t6twMDA1fySpeIRyndrI/UVVFZQkip0I5 VeARSENwcSD86RIDZBlpl55k2rZ4v+mf3roRg18eY/dtEDqQ8114wD7dCmabDNT1 x+WvGeL6c/lXld8rf0fMTsllEQGj36lp/+/tKxlK0IYdvpUSwQ4XOQGZtMrgQDNs LtRzpOBGrEcvoRXsiQPCyFMHAa66lKRDcf/4yVBuZwRNJYy1gFBNp6YrJohaJ/Zc iI5sOh9wGENGjO47ZBsQP2ywbUbXtnPsswMNqaOvOnNohvxjmUHSARzlrNSntLhl FdFX4sQ8YXiblJcvrr/wT4zC4TDBywYwCPFDbblByxHg0TK5QSY= =jZUx -----END PGP SIGNATURE----- --hHWLQfXTYDoKhP50--