lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 28 Jan 2021 12:44:46 +0200
From:   Tudor Ambarus <tudor.ambarus@...rochip.com>
To:     <mturquette@...libre.com>, <sboyd@...nel.org>,
        <nicolas.ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
        <ludovic.desroches@...rochip.com>, <claudiu.beznea@...rochip.com>,
        <mirq-linux@...e.qmqm.pl>, <saravanak@...gle.com>
CC:     <gregkh@...uxfoundation.org>, <linux-clk@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        "Tudor Ambarus" <tudor.ambarus@...rochip.com>
Subject: [PATCH] clk: at91: sama5d2: Mark device OF_POPULATED after setup

The sama5d2 requires the clock provider initialized before timers.
We can't use a platform driver for the sama5d2-pmc driver, as the
platform_bus_init() is called later on, after time_init().

As fw_devlink considers only devices, it does not know that the
pmc is ready. Hence probing of devices that depend on it fail:
probe deferral - supplier f0014000.pmc not ready

Fix this by setting the OF_POPULATED flag for the sama5d2_pmc
device node after successful setup. This will make
of_link_to_phandle() ignore the sama5d2_pmc device node as a
dependency, and consumer devices will be probed again.

Fixes: e590474768f1cc04 ("driver core: Set fw_devlink=on by default")
Signed-off-by: Tudor Ambarus <tudor.ambarus@...rochip.com>
---
I'll be out of office, will check the rest of the at91 SoCs
at the begining of next week.

 drivers/clk/at91/sama5d2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
index 9a5cbc7cd55a..5eea2b4a63dd 100644
--- a/drivers/clk/at91/sama5d2.c
+++ b/drivers/clk/at91/sama5d2.c
@@ -367,6 +367,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
 
 	of_clk_add_hw_provider(np, of_clk_hw_pmc_get, sama5d2_pmc);
 
+	of_node_set_flag(np, OF_POPULATED);
+
 	return;
 
 err_free:
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ