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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 22 Mar 2019 12:13:01 +0100
From:   Greg Kroah-Hartman <>
Cc:     Greg Kroah-Hartman <>,,
        Bartosz Golaszewski <>,
        Daniel Lezcano <>,
        "H. Nikolaus Schaller" <>,
        Keerthy <>,
        Ladislav Michl <>,
        Pavel Machek <>,
        Sebastian Reichel <>,
        Tero Kristo <>,
        Thierry Reding <>,
        Thomas Gleixner <>,
        Andreas Kemnade <>,
        Tony Lindgren <>,
        Sasha Levin <>
Subject: [PATCH 4.19 028/280] clocksource: timer-ti-dm: Fix pwm dmtimer usage of fck reparenting

4.19-stable review patch.  If anyone has any objections, please let me know.


[ Upstream commit 983a5a43ec254cd5ddf3254db80ca96e8f8bb2a4 ]

Commit 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe
them with ti-sysc") moved some omap4 timers to probe with ti-sysc
interconnect target module. Turns out this broke pwm-omap-dmtimer
where we now try to reparent the clock to itself with the following:

omap_dm_timer_of_set_source: failed to set parent

With ti-sysc, we can now configure the clock sources in the dts
with assigned-clocks and assigned-clock-parents. So we should be able
to remove omap_dm_timer_of_set_source with clean-up patches later on.
But for now, let's just fix it first by checking if parent and fck
are the same and bail out of so.

Fixes: 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc")
Cc: Bartosz Golaszewski <>
Cc: Daniel Lezcano <>
Cc: H. Nikolaus Schaller <>
Cc: Keerthy <>
Cc: Ladislav Michl <>
Cc: Pavel Machek <>
Cc: Sebastian Reichel <>
Cc: Tero Kristo <>
Cc: Thierry Reding <>
Cc: Thomas Gleixner <>
Reported-by: H. Nikolaus Schaller <>
Tested-By: Andreas Kemnade <>
Tested-By: H. Nikolaus Schaller <>
Signed-off-by: Tony Lindgren <>
Signed-off-by: Sasha Levin <>
 drivers/clocksource/timer-ti-dm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 4cce6b224b87..3ecf84706640 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -154,6 +154,10 @@ static int omap_dm_timer_of_set_source(struct omap_dm_timer *timer)
 	if (IS_ERR(parent))
 		return -ENODEV;
+	/* Bail out if both clocks point to fck */
+	if (clk_is_match(parent, timer->fclk))
+		return 0;
 	ret = clk_set_parent(timer->fclk, parent);
 	if (ret < 0)
 		pr_err("%s: failed to set parent\n", __func__);

Powered by blists - more mailing lists