Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754784Ab3JBRKF (ORCPT ); Wed, 2 Oct 2013 13:10:05 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:33169 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754205Ab3JBRKD (ORCPT ); Wed, 2 Oct 2013 13:10:03 -0400 Date: Wed, 2 Oct 2013 18:09:17 +0100 From: Will Deacon To: Santosh Shilimkar Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "arm@kernel.org" , Stephen Boyd , John Stultz , Russell King , "rob.herring@calxeda.com" , Thomas Gleixner Subject: Re: [PATCH] sched_clock: fix postinit no sched_clock function check Message-ID: <20131002170917.GB30298@mudshark.cambridge.arm.com> References: <1380732928-13897-1-git-send-email-santosh.shilimkar@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1380732928-13897-1-git-send-email-santosh.shilimkar@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1184 Lines: 25 On Wed, Oct 02, 2013 at 05:55:28PM +0100, Santosh Shilimkar wrote: > The sched_clock code uses 2 levels of function pointers, sched_clock_func() > and read_sched_clock() but the no sched_clock check in postinit() just > checks read_sched_clock(). > > This leads to kernel falling back to jiffy based sched clock even in > presence of sched_clock_func() which is not desirable. > > Fix the postinit() check to avoid the issue. Probably the issue is hidden > so far on most of the arm SOCs because of already existing sched_clock > registrations apart from arch_timer sched_clock. One can reproduce the > issue by just have arch_timer as sched_clock Isn't this just an issue with the arch timer driver not calling setup_sched_clock? Instead, we munge around with sched_clock_func directly, which doesn't appear to be the way anybody else deals with this. I'm not sure of the history though, so perhaps there's a reason for this... Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/