Wind River Support Network


LIN7-3417 : BayTrail: userspace GPIO problem with locking

Created: Apr 13, 2015    Updated: Sep 8, 2018
Resolved Date: Jan 22, 2016
Found In Version: 7.0
Fix Version:
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: BSP


Issue observed when exporting via /sys/class/gpio/export. 
The Baytrail pinctrl driver (drivers/pinctrl/pinctrl-baytrail.c) appears to have a recursive locking problem. 
That is, it causes an IRQ-masked spin-lock to be taken and then, later, another IRQ-masked spin-lock is 
requested with causes the might_sleep() debugging aid to trigger because the second lock request as the potential to sleep.


Attached config.log, pkglist.and .config.

Customer board exports these GPIOs:
-bash-3.2# ls /sys/class/gpio/
export   gpio111  gpio207  gpio213  gpio83  gpiochip126  unexport
gpio109  gpio112  gpio209  gpio214  gpio84  gpiochip154
gpio110  gpio161  gpio212  gpio226  gpio85  gpiochip82

This problem should reproduce on any Baytrail when GPIOs are exported that have associated interrupts and the kernel config CONFIG_DEBUG_ATOMIC_SLEEP is enabled.

Other Downloads

Live chat