Re: [PATCHv3 0/5] pinctrl fixes for generic functions and groups

From: H. Nikolaus Schaller
Date: Thu Jul 05 2018 - 09:29:26 EST


Hi Tony and Linus,

> Am 05.07.2018 um 11:10 schrieb Tony Lindgren <tony@xxxxxxxxxxx>:
>
> Here is a resend of fixes for a race issues for generic group and
> functions reported by H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>.

Thanks for adding me.

I have tested these patches on our OMAP3 based device where the problem
was quite reproducible and testable by adding some printk. With
these patches it seems now to be correct. Each group selector is
assigned only once, even if driver probing fails and is redone later.

Code review of the call paths has convinced us that we now have
proper mutex around the radix tree function calls and races are
no longer a problem.

So you can add my

Tested-By: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>

BR and thanks,
Nikolaus

>
> Regards,
>
> Tony
>
>
> Changes since v2:
>
> - Added Nikolaus to Cc as Reported-by did not do it
>
> Changes since v1:
>
> - Check if a function or group already exists as suggested by
> Andy Shevchenko
>
> - Make sure we always have a valid name for functions and groups
> as suggested by Christ van Willegen
>
> - Prettify rza1 variables as suggested by Jacopo Mondi
>
> Tony Lindgren (5):
> pinctrl: core: Return selector to the pinctrl driver
> pinctrl: pinmux: Return selector to the pinctrl driver
> pinctrl: single: Fix group and function selector use
> pinctrl: rza1: Fix selector use for groups and functions
> pinctrl: core: Remove broken remove_last group and pinmux functions
>
> drivers/pinctrl/core.c | 35 ++++++++++--
> drivers/pinctrl/core.h | 6 ---
> drivers/pinctrl/pinctrl-rza1.c | 24 +++++----
> drivers/pinctrl/pinctrl-single.c | 91 +++++++++++++++++++-------------
> drivers/pinctrl/pinmux.c | 16 ++++--
> drivers/pinctrl/pinmux.h | 7 ---
> 6 files changed, 112 insertions(+), 67 deletions(-)
>
> --
> 2.17.1