[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1574447102.3.1@crapouillou.net>
Date: Fri, 22 Nov 2019 19:25:02 +0100
From: Paul Cercueil <paul@...pouillou.net>
To: Pavel Machek <pavel@...x.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 070/422] pinctrl: ingenic: Probe driver at
subsys_initcall
Hi Pavel,
Le jeu., nov. 21, 2019 at 11:17, Pavel Machek <pavel@...x.de> a écrit :
> On Tue 2019-11-19 06:14:27, Greg Kroah-Hartman wrote:
>> From: Paul Cercueil <paul@...pouillou.net>
>>
>> [ Upstream commit 556a36a71ed80e17ade49225b58513ea3c9e4558 ]
>>
>> Using postcore_initcall() makes the driver try to initialize way too
>> early.
>
> Does it fix concrete bug / would you say it is suitable for -stable?
When using postcore_initcall() it locks up early in the boot process,
so it definitely fixes a bug. I think it locks up because standard
(non-early) platform drivers can't be probed postcore (but they can be
registered and probed later).
>
>> +++ b/drivers/pinctrl/pinctrl-ingenic.c
>> @@ -847,4 +847,4 @@ static int __init
>> ingenic_pinctrl_drv_register(void)
>> {
>> return platform_driver_register(&ingenic_pinctrl_driver);
>> }
>> -postcore_initcall(ingenic_pinctrl_drv_register);
>> +subsys_initcall(ingenic_pinctrl_drv_register);
>
> There are other pinctrl drivers initialized very early, do they need
> fixing, too?
The other drivers call platform_driver_register(), not
platform_driver_probe(), which means that they will probe at the same
time as the other platform drivers.
The reason platform_driver_probe() is used in pinctrl-ingenic is that
it allows the probe function and all the code attached to be marked
__init.
Cheers,
-Paul
Powered by blists - more mailing lists