Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752674AbdCOSTN (ORCPT ); Wed, 15 Mar 2017 14:19:13 -0400 Received: from mx0a-00010702.pphosted.com ([148.163.156.75]:45649 "EHLO mx0b-00010702.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751310AbdCOSSA (ORCPT ); Wed, 15 Mar 2017 14:18:00 -0400 Date: Wed, 15 Mar 2017 13:17:30 -0500 From: Julia Cartwright To: Linus Walleij CC: John Keeping , Heiko Stuebner , "linux-gpio@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Rockchip SoC..." , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes Message-ID: <20170315181730.GC682@jcartwri.amer.corp.natinst.com> References: <20170313183813.3582-1-john@metanate.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f2QGlHpHGjS2mn6Y" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-15_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703150138 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-15_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=30 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703150138 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2480 Lines: 57 --f2QGlHpHGjS2mn6Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 15, 2017 at 02:12:39PM +0100, Linus Walleij wrote: > On Mon, Mar 13, 2017 at 7:38 PM, John Keeping wrote: >=20 > > As described in Documentation/gpio/driver.txt, we should not be using > > sleepable APIs in the irqchip implementation. Since this includes the > > regmap API, this patch series ends up moving the mux setup for IRQs into > > an irq_bus_sync_unlock() handler which may result in the IRQ being > > configured before the port has been muxed as a GPIO. > > > > I've marked the series as RFC because I'm not sure if this is the best > > way to accomplish this or if there is another approach that is cleaner. > > Also, the first patch may not be correct on RK3399 because I originally > > wrote the patch for RK3288 on top of v4.4 where all drive updates only > > affect a single register. We don't need locking in this case because > > regmap_update_bits() takes a lock on the regmap internally, but if these > > two registers need to be updated atomically then another lock will > > be required here - slock cannot be used if it is converted to a raw > > spinlock since with full RT preemption the regmap's spinlock may sleep. >=20 > Nice work! It all looks good to me, let's see what Heiko says. >=20 > Please keep Julia Cartwright on the CC for this patch series, she is > doing some coccinelle-based rewrites to use raw spinlocks as we > speak, and she knows this stuff. >=20 > She has not targeted the Rockchip driver yet, I guess because of > its complexity. I haven't really given much thought to how we might generically solve raw_spinlock problems for those drivers which make of irq_chip_generic just yet. I don't imagine it would be too difficult, just more work. Thanks for the CC. Julia --f2QGlHpHGjS2mn6Y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEgKAEF431w1EL96k9jNrC4UVNdG8FAljJhTcACgkQjNrC4UVN dG8J0ggAnmLjlTFh5Xc+HNTHAda33ZrkUSdO/yu8HYGet+iZXDr5LXJe9JMHqSRB //IPiMJjeRhagDFB/rYHmDu1WehVBLy/UcM+75g8B0fUnpJ9ikqVTddRrx292IxT xxsnyLkelJRNI43hYMjeOSungCL7etHxYM53YIKeyob6DvU+69L5TlXlEHr8WlZm haT+M8PVkKQiAgueFjniCN+UsR1GXOuM8omYSFJoBVTjAAvN6z/XbVl3JGsh4hbO LYUnBZPOa778h/ljJW526Fza6f69FzHEiSN3JeQWI0bi/gAjmKyLd5WvbpE6w0Ui 53XWUAzdVOhR4pcMd88mMzEc81f0aw== =Z0Qv -----END PGP SIGNATURE----- --f2QGlHpHGjS2mn6Y--