Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756657Ab3CQUGG (ORCPT ); Sun, 17 Mar 2013 16:06:06 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:47544 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756500Ab3CQUGB (ORCPT ); Sun, 17 Mar 2013 16:06:01 -0400 Date: Sun, 17 Mar 2013 20:05:43 +0000 From: Will Deacon To: chpoph Cc: Russell King - ARM Linux , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Viresh Kumar , Nicolas Pitre , Liviu Dudau , Greg Kroah-Hartman Subject: Re: udelay function delays the wrong time interval in multiprocessor system, if ARCH_HAS_READ_CURRENT_TIMER is not defined and on current timer is used. Message-ID: <20130317200543.GA20174@mudshark.cambridge.arm.com> References: <20130315181449.GX4977@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 1350 Lines: 31 On Sat, Mar 16, 2013 at 03:32:43AM +0000, chpoph wrote: > On Sat, Mar 16, 2013 at 2:14 AM, Russell King - ARM Linux > wrote: > > We don't support different CPUs running at different frequencies with > > the delay loop. Sorry. > > Does it means that a timer-based delay implementation must be used to > get an accurate delay in SMP. I think it should print a warning > message if the CPU delay loop is used in SMP. In my system, the wrong > delay interval fluctuated with CPU frequencies caused a control > problem. I've been playing around with loops_per_jiffy recently, in an attempt to clean up the cpufreq scaling code so that the SMP-ness is in core code, rather than being duplicated by every architecture: git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git lpj With those changes, it's pretty easy to get different delays depending on the current CPU, but it would require preempt_{enable,disable} calls around the delay, which I haven't convinced myself about. Do you actually have an ARM platform that can scale the CPU frequencies independently? 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/