Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5400651imu; Wed, 19 Dec 2018 10:25:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/WmfyayzZCvDaGoZc7JT4BmsC9cEIDUnWnxh9m3uw3XPaUUIbSy5p6cpqQWihNtea8+C8Vd X-Received: by 2002:a62:3943:: with SMTP id g64mr6859636pfa.114.1545243952582; Wed, 19 Dec 2018 10:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545243952; cv=none; d=google.com; s=arc-20160816; b=aLprI1H59+rltU0R+qaqUpHpaLsvkoa3yoY6joDbWwvfXKV+QKYYq0r34ghUzu8iM0 /GpW+5hbeJ845FfcwZQCLwaG62s8SX0Sp2wq0H9j816y+ba98yTM+ZvsjtU6PvH/1of7 AtdDKnnYwijbsWwCnhOWr16nU4eWYb46TkzR8ylUEQ7bsdpZdzU57+MilQ3Yb7BMHFtc bqSP6qAd5J8scH9lwxqBWFgNJCN7naS30dYdpqLhvtaPBoD2x+FFGEOuGcNb0bthj12f UizXxP/FJCoN5Sxr/+1G/aOTo9adR+bCgDUV0LgJA3CRy0A4zZywbLy0bF7xHXe4QM19 eEjA== 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; bh=U8i7JAoj+kYk7+Sh9i1GK82WxcbmwTR2y+q29O9X3ew=; b=Iee9ptFLDrBLS0Y7iT8CQbMQCbsAWinypWCSGZGmcjGiD9xYa2YlJWO2liYYmIrPUB fQKcmHHZGI08euCw5C7TxLu4ECnar7EPoGySCUwTcuWlzCrBK6adAP0OTQ7HHbaNtUGl NiHFquvkivlerxyO+5O11gb+Se5Er8riXvDPNHq/d3tRIluvgqEFYZoVWSm28uI9vc8p wt6gDOx5vPcw3gIMxUMBtL03rZuuflxl2MxkGAVzmUGPBaOQPeRujV58vK/fQiR9TbuR KziJgd2EigITi0B3iUc1mPnZVhYLIs0ek8AQYR8NjP9ZLSi4JuvFFYomXvJdPki2bz1p OnUg== 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 o28si16714469pgm.238.2018.12.19.10.25.16; Wed, 19 Dec 2018 10:25:52 -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 S1729133AbeLSQdF (ORCPT + 99 others); Wed, 19 Dec 2018 11:33:05 -0500 Received: from sauhun.de ([88.99.104.3]:55582 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbeLSQbV (ORCPT ); Wed, 19 Dec 2018 11:31:21 -0500 Received: from localhost (p54B333DA.dip0.t-ipconnect.de [84.179.51.218]) by pokefinder.org (Postfix) with ESMTPSA id D85332E3542; Wed, 19 Dec 2018 17:31:18 +0100 (CET) Date: Wed, 19 Dec 2018 17:31:15 +0100 From: Wolfram Sang To: Geert Uytterhoeven Cc: Peter Rosin , Hans de Goede , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , Wolfram Sang , "linux-i2c@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [RFC/RFT 01/10] i2c: add 'is_suspended' flag for i2c adapters Message-ID: <20181219163115.fdnl6kivywuxdgmu@ninjato> References: <20181210210310.12677-1-wsa+renesas@sang-engineering.com> <20181210210310.12677-2-wsa+renesas@sang-engineering.com> <20181218233354.pie5i3lvrrhq5q2c@ninjato> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qjxzn2xrzruodsqv" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qjxzn2xrzruodsqv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 19, 2018 at 10:39:05AM +0100, Geert Uytterhoeven wrote: > Hi Wolfram, >=20 > On Wed, Dec 19, 2018 at 12:34 AM Wolfram Sang wrote: > > > > + unsigned int is_suspended:1; /* owned by the I2C core */ > > > > > > When more stuff is added to this bit field (which always happens at > > > some point) updates to all members of the bit field will have to use > > > the same root-adapter-locking, or we will suffer from RMW-races. So > > > this feels like an invitation for future disaster. Maybe a comment > > > about that to remind our future selves? Or perhaps the bit field > > > should be avoided altogether? > > > > Changed to bool. Thanks! >=20 > Does that help, given bool is smaller than the CPUs word size? > Is it Alpha that cannot do atomic operations on bytes? Yup, I overestimated bools :( I guess good old unsigned long locked_flags; #define _IS_SUSPENDED 0 set_bit(), clear_bit(), and test_bit() is it then. --qjxzn2xrzruodsqv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlwack8ACgkQFA3kzBSg KbY9JRAAhxm2Kip+tvnMls1hk+/Edk4mmwGCNgQoxQX2AhW3Lw0vyAffaBG7S+eG UwNg372M5JC8Rva111oTpAVr8MhvAVuJnGFpG0UMJIDWXQGJ2UKcumx7DNHwYjiB zkDtrdjilgbGSe9SVRco+BbBK6qy/mdNI+GBAnXB9bC+Xbawe+3KTlgGVlFpjS9r Yb02KmVERIxeBYbzNw23S9Tx3raZVOnGSz2am/n9GGrM/kFtBK1Ge7W+Acq92VoF 9C3AOy0ZoyY8sgz5rR0TRuoVgkXC/8AKsWqS3dVCpR0iZPVG9ZYth5ta7rRojjeJ C/s1Hgq6oR2zxXLiM/NG7SbdIiVMekYbEDrRx2zsBwg18aynLRuygwnqHkT6WE8A lfZKa/LEVvP9p5Xw4Lwak0jxtqAJzGIv6ebJRN5tLmcRP9vYRuKk/D5RbWq4U6bZ fuI6Z589b4nZkWgx52G8RCu3NImmLFxbhJd9RjOm9buE5b3nz4aatviQbno2uJ6s gC3SMz9p0nG7A0cdEYcXXG2/FrKXl3lQtIU028DFRkkfGARRX5bj6+I7bp/s4Vby 0wsdtXwezh9SQPBiJBbtilD9j6oDZGep3/tLVWacvbn3T819oEfVltn26YHQbuz2 VDmUUE5YtgAdUqjUJ2YM0BOZ+bHAGEzGDY2DJLMSwWs7Clu79FE= =KkzT -----END PGP SIGNATURE----- --qjxzn2xrzruodsqv--