Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753242AbdCONMo (ORCPT ); Wed, 15 Mar 2017 09:12:44 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:34387 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbdCONMl (ORCPT ); Wed, 15 Mar 2017 09:12:41 -0400 MIME-Version: 1.0 In-Reply-To: <20170313183813.3582-1-john@metanate.com> References: <20170313183813.3582-1-john@metanate.com> From: Linus Walleij Date: Wed, 15 Mar 2017 14:12:39 +0100 Message-ID: Subject: Re: [RFC PATCH 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes To: John Keeping , Julia Cartwright Cc: Heiko Stuebner , "linux-gpio@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Rockchip SoC..." , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1409 Lines: 29 On Mon, Mar 13, 2017 at 7:38 PM, John Keeping wrote: > 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. Nice work! It all looks good to me, let's see what Heiko says. 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. She has not targeted the Rockchip driver yet, I guess because of its complexity. Yours, Linus Walleij