]> git.baikalelectronics.ru Git - kernel.git/commit
clk: at91: fix possible deadlock
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 28 Nov 2019 10:25:31 +0000 (11:25 +0100)
committerStephen Boyd <sboyd@kernel.org>
Mon, 16 Dec 2019 17:56:18 +0000 (09:56 -0800)
commita93147c4dfcb7800a5e21e60cf5e8b3f5384c069
treebc5073c9253c9c2e6e899ee55186c8de98ffac81
parentc8d33700b289d3a314a501b29dc23e09d6c52159
clk: at91: fix possible deadlock

Lockdep warns about a possible circular locking dependency because using
syscon_node_to_regmap() will make the created regmap get and enable the
first clock it can parse from the device tree. This clock is not needed to
access the registers and should not be enabled at that time.

Use the recently introduced device_node_to_regmap to solve that as it looks
up the regmap in the same list but doesn't care about the clocks.

Reported-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lkml.kernel.org/r/20191128102531.817549-1-alexandre.belloni@bootlin.com
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/at91/at91sam9260.c
drivers/clk/at91/at91sam9rl.c
drivers/clk/at91/at91sam9x5.c
drivers/clk/at91/pmc.c
drivers/clk/at91/sama5d2.c
drivers/clk/at91/sama5d4.c