[PATCH] ARM/ARM64: arch-timer: fix arch_timer_probed logic
Sudeep Holla
sudeep.holla at arm.com
Wed Oct 15 08:49:04 PDT 2014
On 15/10/14 16:28, Mark Rutland wrote:
> On Wed, Oct 15, 2014 at 04:06:20PM +0100, Marc Zyngier wrote:
>> 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).
>
> As far as I can tell, the logic is flawed for all cases except two
> functional nodes that we manage to probe.
>
Agreed, it's my mistake. I inverted the logic incorrectly when I moved
it to a function while adding of_node_put in v2 of the patch.
I think wrong DTB got picked up when I tested this. I am sorry for that.
>>
>> Just fix the damned logic, and enjoy booting VMs again.
>>
>> Tested on a Juno system.
>>
>> Cc: Sudeep Holla <sudeep.holla at arm.com>
>> Cc: Stephen Boyd <sboyd at codeaurora.org>
>> Cc: Mark Rutland <mark.rutland at arm.com>
>> Cc: Daniel Lezcano <daniel.lezcano at linaro.org>
>> Cc: Christoffer Dall <christoffer.dall at linaro.org>
>> Reported-by: Riku Voipio <riku.voipio at linaro.org>
>> Signed-off-by: Marc Zyngier <marc.zyngier at arm.com>
>
> The new logic makes sense to me, so:
>
> Acked-by: Mark Rutland <mark.rutland at arm.com>
Acked-by: Sudeep Holla <sudeep.holla at arm.com>
Tested-by: Sudeep Holla <sudeep.holla at arm.com>
(This time tested all possible case)
Regards,
Sudeep
More information about the linux-arm-kernel
mailing list