Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3246044img; Mon, 25 Mar 2019 06:41:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEyG3YFceCif6WcZ0BPFpLpvk9/XcZGSR+9rcyjcfd3rHyxzwfpB0xl5t/hl/TIr2DNza2 X-Received: by 2002:a17:902:b58f:: with SMTP id a15mr11312161pls.36.1553521284045; Mon, 25 Mar 2019 06:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553521284; cv=none; d=google.com; s=arc-20160816; b=Vv5R2eA1+8xn/Cxz8X1JtI9QNPy9TSF+051rL/orrLNo0EAgMnL1nbo1+hibuZql6H 1Fw27jYXlk2nEx/upxK3qyYBQw/V7Xrtq1o0HOse+YhExurDnSkXlX5nbKXLnj+U6qnE 526V50p85Tbce0kIQH5dqdOc9meJs90DFqop8B44QPmP4VPqUrWAmIkdPCGSMdUGIIwE l+qGdp+gE5SYSaxaCYbkniPwwx1uuiwhNbqKHn2ZwXlvjrvjNq0nwwa0+ud9myk9mhk1 dY1vwCAJZ515DeIiMUs5HhYFtMSlN/yE4Kk5oFj2r+nYaQFs4xdIWIyN9UJGtFUjWA27 0YpQ== 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=h+n1xwBmMGYGThkv/QT7E0udfskdPQOw+rhXV0JupeY=; b=mktEvDyEqF3BSILLiIalxlRbgbTDso3MGPEKNze8+t3rAvbJ4kylxmqQmyl17dS1P1 +xiNgxJvIsYxRJTxRhOGW0/n/ZtXdjJH+kRq1uP3bn4TzZpyFrw16NI5yBVlrHgvc7w3 M3V3zCdcSrpsxNugsJhn41UwoNgD698hpcaFVCCL4iK2kk3UpGteQSJb6FN08QMI/iMH V3KX9i/e6bqcrc/QtOdskt/AO3jxsDZrqgqKEfAqhZxseM7VXmhP5OqOKrpMXyO/UhUQ yDO8rdXaHAXXrN4gjeyXnpi3pHutGVz2yMHHe4xEHwXgm7Fh3iqNTa5Vd0j/OdKppuV3 1ALg== 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 g96si14928776plb.168.2019.03.25.06.41.09; Mon, 25 Mar 2019 06:41:24 -0700 (PDT) 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 S1728983AbfCYNkY (ORCPT + 99 others); Mon, 25 Mar 2019 09:40:24 -0400 Received: from sauhun.de ([88.99.104.3]:46124 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbfCYNkX (ORCPT ); Mon, 25 Mar 2019 09:40:23 -0400 Received: from localhost (p54B33284.dip0.t-ipconnect.de [84.179.50.132]) by pokefinder.org (Postfix) with ESMTPSA id 06A7E2C0963; Mon, 25 Mar 2019 14:40:20 +0100 (CET) Date: Mon, 25 Mar 2019 14:40:20 +0100 From: Wolfram Sang To: Andy Shevchenko Cc: Wolfram Sang , linux-i2c , Linux-Renesas , Linux Kernel Mailing List , linux-arm Mailing List , Keerthy , Peter Rosin , Tony Lindgren , Russell King , Andy Shevchenko , Stefan Lengfeld , Phil Reid , Tero Kristo , Linux OMAP Mailing List , linux-tegra@vger.kernel.org Subject: Re: [RFC PATCH v2 0/7] i2c: core: introduce atomic transfers Message-ID: <20190325134020.GA3375@kunai> References: <20190302134735.4393-1-wsa+renesas@sang-engineering.com> <20190312154501.6v2symbq6eutp6dj@ninjato> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline In-Reply-To: <20190312154501.6v2symbq6eutp6dj@ninjato> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > This series seems like a valid approach to me if we still want to > respect the locking. And I am leaning to that it is good enough. I think pragmatism is OK here: The users who want this feature simply want to reboot their system, mostly development systems. They can't reboot otherwise. Except for the HW switch they are currently using anyhow. The panic fault-injector can create an inconsistent situation on the I2C bus when you want to reboot after an OOPS while a transfer was in progress. However, if rebooting in such scenarios is critical for you, you a) shouldn't reboot via I2C, and/or b) should have a watchdog in place. We can't guarantee to always fix this sitution. At best, we could just try to be better for some cases. However, this would mean having a backdoor to skip the locking scheme which doesn't sound right. Maybe just accepting the deadlock is not too bad because it will reliably point out a design flaw of the system (hopefully during the development stage)? Final call for other thoughts/comments. PS: I am still interested in the use of in_atomic() here. I wonder if it is correct. If a change is needed, it should probably be a seperate series, though. --5mCyUwZo2JvN/JJP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlyY2kAACgkQFA3kzBSg KbZo2g//dCNbQqq7JCJ5Lv/VujuOvXfvIAhTdixDdvjH0OB63oi+g7uOczVtHA3C MwOtHz0SzrK28zgFKP54noME6BxsaNA/wkFGRidTz5e1SbxgEuDBefLKTjo6eXWV w4qE87SZteJtKQhMTu2fMELiwDQoI3mVfWuBEucdhIqa9zumT6RALS5z/miAzr6E M53RUZ+k/tOanoOyuDN99mvhL3YSKNqPXe6Ixayx5VX9tVZAi+ua2nl9STbdsIio lwiBv3A4i/DEw7SMl3hxJfyQs2CE3y7Ix7EDJE85pGGruCY7QD9HpH6KNadmhg2q YMtSymts2f5jy1ZKtdrd9R7oR/Ihw6ZyaUME3qU92igmnAdIOJsDXPVoWQruSsLE 6z0v5rsqQ6Vk+hSUbKEC6Ild80zEuKOcuQW12dHeZI+m6+7duLlvafp9RnKBK0pO bkmJchXcOTwLUUT/Y93zmI2cbPrGwx6Bjkbyv2I5O7asAxDHTJBG6qjBeaLaxrpq 8PoNHnbrfNburNrmt90qCM/5MTT1B1VK+ghoy2vLD0mjf0Y9DQd4WyCyK1+p781Q CdqGh08ptk2VCdnRe8/WBjHIJ4T4FVM43nrDx+86nVXbgmHYhjYF5LPEl1K9svpe loGz64ibwn+UIG/8rZZaYauCzqdgYjGRHtp807khprYzC/KfHI0= =gywM -----END PGP SIGNATURE----- --5mCyUwZo2JvN/JJP--