From: Fabio Estevam <festevam@gmail.com>
To: Martin Kaiser <martin@kaiser.cx>
Cc: Dong Aisheng <aisheng.dong@nxp.com>,
Shawn Guo <shawnguo@kernel.org>, Stefan Agner <stefan@agner.ch>,
Sascha Hauer <kernel@pengutronix.de>,
Linus Walleij <linus.walleij@linaro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: imx: make sure that maps are fully initialized
Date: Sat, 10 Nov 2018 15:49:00 -0200 [thread overview]
Message-ID: <CAOMZO5CF0KoAckvJ++FuQcaj2d1bNBCvZMzThuezUCQ95+od_g@mail.gmail.com> (raw)
In-Reply-To: <1541871439-4882-1-git-send-email-martin@kaiser.cx>
Hi Martin,
On Sat, Nov 10, 2018 at 3:39 PM Martin Kaiser <martin@kaiser.cx> wrote:
>
> The commit that added scu based pinctrl support introduced a regression
> for the mmio case. In the for-loop where the maps are initialized, we
> end up creating a partially initialized map in some cases. This causes a
> kernel panic when such a map is used at a later stage.
>
> When scu is not used and and a pin uses the default pad configuration,
> the current code sets the map's type and data.configs.group_or_pin but
> no configs or num_configs are set. The previous code without scu
> support did not create a new map at all in this case and did not
> increment the counter.
>
> Fix this by setting the map type and data.configs.group_or_pin only when
> a configuration was set before, either by scu or by mmio using a
> non-default pad config. Increment the counter only if a new map was
> created.
>
> Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support")
> Cc: A.s. Dong <aisheng.dong@nxp.com>
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Thanks for the fix:
Reviewed-by: Fabio Estevam <festevam@gmail.com>
next prev parent reply other threads:[~2018-11-10 17:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 17:37 [PATCH] pinctrl: imx: make sure that maps are fully initialized Martin Kaiser
2018-11-10 17:49 ` Fabio Estevam [this message]
2018-11-11 22:37 ` Leonard Crestez
2018-11-12 15:37 ` Martin Kaiser
2018-11-12 15:04 ` A.s. Dong
2018-11-12 15:09 ` Fabio Estevam
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=CAOMZO5CF0KoAckvJ++FuQcaj2d1bNBCvZMzThuezUCQ95+od_g@mail.gmail.com \
--to=festevam@gmail.com \
--cc=aisheng.dong@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin@kaiser.cx \
--cc=shawnguo@kernel.org \
--cc=stefan@agner.ch \
/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).