aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2014-10-15 11:06:20 -0400
committerDaniel Lezcano <daniel.lezcano@linaro.org>2014-10-26 15:50:00 -0400
commit59aa896db80479dec29f471a7ca2b9eeeeb7d38e (patch)
tree8508fc927d835ce90fd5c7b920ddf185ce6246b4 /drivers/clocksource
parent10632008b9e18b76cbff0ffc69c15e948aa548e0 (diff)
ARM/ARM64: arch-timer: fix arch_timer_probed logic
Commit c387f07e6205 (clocksource: arm_arch_timer: Discard unavailable timers correctly) changed the way the driver makes sure both the memory and system-register timers have been probed before finalizing the probing. There is a interesting flaw in this logic that leads to this final step never to be executed. Things seems to work pretty well until something actually needs the data that is produced during this final stage. For example, KVM explodes on the first run of a guest when executed on a platform that has both memory and sysreg nodes (Juno, for example). Just fix the damned logic, and enjoy booting VMs again. Tested on a Juno system. Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Christoffer Dall <christoffer.dall@linaro.org> Reported-by: Riku Voipio <riku.voipio@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Tested-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/arm_arch_timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 2133f9d59d06..43005d4d3348 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -660,11 +660,11 @@ static bool __init
660arch_timer_probed(int type, const struct of_device_id *matches) 660arch_timer_probed(int type, const struct of_device_id *matches)
661{ 661{
662 struct device_node *dn; 662 struct device_node *dn;
663 bool probed = false; 663 bool probed = true;
664 664
665 dn = of_find_matching_node(NULL, matches); 665 dn = of_find_matching_node(NULL, matches);
666 if (dn && of_device_is_available(dn) && (arch_timers_present & type)) 666 if (dn && of_device_is_available(dn) && !(arch_timers_present & type))
667 probed = true; 667 probed = false;
668 of_node_put(dn); 668 of_node_put(dn);
669 669
670 return probed; 670 return probed;