linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes
@ 2017-03-13 18:38 John Keeping
  2017-03-13 18:38 ` [RFC PATCH 1/4] pinctrl: rockchip: remove unnecessary locking John Keeping
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: John Keeping @ 2017-03-13 18:38 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Linus Walleij, linux-gpio, linux-arm-kernel, linux-rockchip,
	linux-kernel, John Keeping

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.

John Keeping (4):
  pinctrl: rockchip: remove unnecessary locking
  pinctrl: rockchip: convert to raw spinlock
  pinctrl: rockchip: split out verification of mux settings
  pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip

 drivers/pinctrl/pinctrl-rockchip.c | 140 +++++++++++++++++++++++--------------
 1 file changed, 86 insertions(+), 54 deletions(-)

-- 
2.12.0.377.gf910686b23.dirty


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-03-15 18:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13 18:38 [RFC PATCH 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes John Keeping
2017-03-13 18:38 ` [RFC PATCH 1/4] pinctrl: rockchip: remove unnecessary locking John Keeping
2017-03-15 16:25   ` Heiko Stuebner
2017-03-13 18:38 ` [RFC PATCH 2/4] pinctrl: rockchip: convert to raw spinlock John Keeping
2017-03-15 16:28   ` Heiko Stuebner
2017-03-15 16:41     ` Heiko Stuebner
2017-03-15 16:50       ` Heiko Stuebner
2017-03-15 16:59       ` John Keeping
2017-03-15 17:12         ` Heiko Stuebner
2017-03-13 18:38 ` [RFC PATCH 3/4] pinctrl: rockchip: split out verification of mux settings John Keeping
2017-03-15 16:34   ` Heiko Stuebner
2017-03-13 18:38 ` [RFC PATCH 4/4] pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip John Keeping
     [not found]   ` <20170313183813.3582-5-john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org>
2017-03-15 17:04     ` Heiko Stuebner
2017-03-15 13:12 ` [RFC PATCH 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes Linus Walleij
2017-03-15 18:17   ` Julia Cartwright
2017-03-15 17:09 ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).