From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbdEIHDM (ORCPT ); Tue, 9 May 2017 03:03:12 -0400 Received: from terminus.zytor.com ([65.50.211.136]:52265 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbdEIHDL (ORCPT ); Tue, 9 May 2017 03:03:11 -0400 Date: Tue, 9 May 2017 00:00:52 -0700 From: tip-bot for Sudeep Holla Message-ID: Cc: tglx@linutronix.de, hpa@zytor.com, daniel.lezcano@linaro.org, marc.zyngier@arm.com, mark.rutland@arm.com, sudeep.holla@arm.com, mingo@kernel.org, linux-kernel@vger.kernel.org Reply-To: mark.rutland@arm.com, mingo@kernel.org, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, hpa@zytor.com, daniel.lezcano@linaro.org, marc.zyngier@arm.com, tglx@linutronix.de In-Reply-To: <1494246747-17267-1-git-send-email-sudeep.holla@arm.com> References: <1494246747-17267-1-git-send-email-sudeep.holla@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/urgent] clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame() Git-Commit-ID: f63d947c1673930bfc5f2f9bd1073a02c179a890 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: f63d947c1673930bfc5f2f9bd1073a02c179a890 Gitweb: http://git.kernel.org/tip/f63d947c1673930bfc5f2f9bd1073a02c179a890 Author: Sudeep Holla AuthorDate: Mon, 8 May 2017 13:32:27 +0100 Committer: Thomas Gleixner CommitDate: Tue, 9 May 2017 08:56:41 +0200 clocksource/arm_arch_timer: Fix arch_timer_mem_find_best_frame() 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 Acked-by: Mark Rutland Cc: Marc Zyngier Cc: Daniel Lezcano 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 --- drivers/clocksource/arm_arch_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index a1fb918..4bed671 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -1268,7 +1268,7 @@ arch_timer_mem_find_best_frame(struct arch_timer_mem *timer_mem) pr_err("Unable to find a suitable frame in timer @ %pa\n", &timer_mem->cntctlbase); - return frame; + return best_frame; } static int __init