]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame()
authorSudeep Holla <sudeep.holla@arm.com>
Wed, 30 Aug 2017 17:41:00 +0000 (19:41 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 15 Sep 2017 12:33:56 +0000 (14:33 +0200)
commitcb02c5a9f57a1ea3f28fef95eaa67c022254f05b
tree637f38fd864f9cda744b6fcb566eb6fa28253c78
parent1e14f36adba1ecc2e91ace12c420480d6da07b37
clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame()

BugLink: https://bugs.launchpad.net/bugs/1713821
arch_timer_mem_find_best_frame() looks through ARCH_TIMER_MEM_MAX_FRAMES
frames even after finding matches to ensure the best frame is chosen,
which means the variable frame will point to the last valid frame but
not necessarily the best frame.

On Juno, we get the following error as the wrong frame is returned as the
best frame from arch_timer_mem_find_best_frame():

  arch_timer: Unable to map frame @ 0x0000000000000000
  arch_timer: Frame missing phys irq.
  Failed to initialize '/timer@2a810000': -22

Fix the issue by correctly returning the best frame from
arch_timer_mem_find_best_frame().

Fixes: c389d701dfb7 ("clocksource: arm_arch_timer: split MMIO timer probing.")
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1494246747-17267-1-git-send-email-sudeep.holla@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit f63d947c1673930bfc5f2f9bd1073a02c179a890)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/clocksource/arm_arch_timer.c