linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: linux-gpio@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Lukas Wunner <lukas@wunner.de>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Regression in v4.15 due to GPIO .get_multiple changes
Date: Mon, 15 Jan 2018 16:35:48 +0100	[thread overview]
Message-ID: <20180115153547.GA4441@archie.localdomain> (raw)

Hi,

I noticed a regression when testing the GPIOs on an i.MX6 with the
current v4.15-rc8 kernel.

When reading the input value of an internal GPIO, for example with
libgpiod's gpiod_line_get_value, strace shows that userspace blocks
indefinitely at:
ioctl(45, GPIOHANDLE_GET_LINE_VALUES_IOCTL

(The process consumes 100% CPU afterwards and can't be killed)

I looked at changes between v4.14 (working) and v4.15-rc8 (broken),
especially in drivers/gpio/gpio-{mxc,mmio}.c and identified the
following two commits to be responsible:
eec1d566cdf9 ("gpio: Introduce ->get_multiple callback")
80057cb417b2 ("gpio-mmio: Use the new .get_multiple() callback")

Reverting both of them (they are interdependent) fixed the problem.

I don't have a patch to fix it yet, but as it is rather late in the
development cycle of 4.15, I thought it better to report it now. The
author can probably cook up a fix way quicker or decide if you want to
revert.

If you can't reproduce it, let me know and I can send you ftrace
records, test your patches or try to come up with a solution myself.

Cheers,
Clemens

             reply	other threads:[~2018-01-15 15:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 15:35 Clemens Gruber [this message]
2018-01-15 16:51 ` Regression in v4.15 due to GPIO .get_multiple changes Lukas Wunner
2018-01-15 21:49   ` Clemens Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180115153547.GA4441@archie.localdomain \
    --to=clemens.gruber@pqgruber.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=lukas@wunner.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).