From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH 2/2] Convert PowerPC macro spin_event_timeout() to architecture independent macro Date: Wed, 31 Jul 2013 23:43:18 -0500 Message-ID: <51F9E766.604@tabi.org> References: <1375187900-17582-1-git-send-email-B44344@freescale.com> <1375187900-17582-3-git-send-email-B44344@freescale.com> <0DFB48290CDB0C4680160EBE62E8F9A809E9A2E0@039-SN2MPN1-023.039d.mgd.msft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <0DFB48290CDB0C4680160EBE62E8F9A809E9A2E0@039-SN2MPN1-023.039d.mgd.msft.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Goel Arpit-B44344 Cc: "linux-m32r-ja@ml.linux-m32r.org" , "linux-m68k@vger.kernel.org" , "heiko.carstens@de.ibm.com" , "sparclinux@vger.kernel.org" , "sam@ravnborg.org" , "linux-s390@vger.kernel.org" , "jesper.nilsson@axis.com" , "linux@arm.linux.org.uk" , "takata@linux-m32r.org" , Geert Uytterhoeven , Arnd Bergmann , Rob Herring , "john.stultz@linaro.org" , Stephen Warren , "linux-arm-kernel@lists.infradead.org" , "linux-m32r@ml.linux-m32r.org" , "gregkh@linuxfoundation.org" List-Id: linux-m68k@vger.kernel.org Goel Arpit-B44344 wrote: > PowerPC uses hardware timer registers provided by PowerPC architecture to implement spin_event_timeout(). These registers make > PowerPC implementation of spin_event_timeout() more granular in comparison to ones using generic USECS_PER_JIFFY framework. This > would handle those cases more granularly in which evaluation of "condition" is taking time or fails. LOL, it seems I forgot how my own code works. Thanks for the reminder. For some reason, I thought the PowerPC version was also using 'jiffies'. The concern about using 'jiffies' makes a lot more sense now. Almost every architecture has a timebase counter. Wouldn't it make more sense to port tb_ticks_per_usec, get_tbl(), and tb_ticks_since() to other architectures instead? I don't think 'jiffies' is granular enough for spin_event_timeout().