Commit-ID: 59aa896db80479dec29f471a7ca2b9eeeeb7d38e Gitweb: http://git.kernel.org/tip/59aa896db80479dec29f471a7ca2b9eeeeb7d38e Author: Marc Zyngier <marc.zyngier@xxxxxxx> AuthorDate: Wed, 15 Oct 2014 16:06:20 +0100 Committer: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> CommitDate: Sun, 26 Oct 2014 20:50:00 +0100 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@xxxxxxx> Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx> Cc: Mark Rutland <mark.rutland@xxxxxxx> Cc: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> Cc: Christoffer Dall <christoffer.dall@xxxxxxxxxx> Reported-by: Riku Voipio <riku.voipio@xxxxxxxxxx> Acked-by: Mark Rutland <mark.rutland@xxxxxxx> Acked-by: Sudeep Holla <sudeep.holla@xxxxxxx> Tested-by: Sudeep Holla <sudeep.holla@xxxxxxx> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> --- drivers/clocksource/arm_arch_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 2133f9d..43005d4 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -660,11 +660,11 @@ static bool __init arch_timer_probed(int type, const struct of_device_id *matches) { struct device_node *dn; - bool probed = false; + bool probed = true; dn = of_find_matching_node(NULL, matches); - if (dn && of_device_is_available(dn) && (arch_timers_present & type)) - probed = true; + if (dn && of_device_is_available(dn) && !(arch_timers_present & type)) + probed = false; of_node_put(dn); return probed; -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |