Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262710AbVEAVYw (ORCPT ); Sun, 1 May 2005 17:24:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262677AbVEAVYW (ORCPT ); Sun, 1 May 2005 17:24:22 -0400 Received: from lakshmi.addtoit.com ([198.99.130.6]:28435 "EHLO lakshmi.solana.com") by vger.kernel.org with ESMTP id S262690AbVEAVSf (ORCPT ); Sun, 1 May 2005 17:18:35 -0400 Message-Id: <200505012113.j41LD353016483@ccure.user-mode-linux.org> X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.0.4 To: torvalds@osdl.org cc: akpm@osdl.org, linux-kernel@vger.kernel.org, bstroesser@fujitsu-siemens.com Subject: [PATCH 19/22] UML - S390 preparation, delay moved to arch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 01 May 2005 17:13:03 -0400 From: Jeff Dike Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4959 Lines: 166 From: Bodo Stroesser s390 has fast read access to realtime clock (nanosecond resolution). So it makes sense to have an arch-specific implementation not only of __delay, but __udelay also. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike diff -puN arch/um/sys-i386/delay.c~delay-pure-arch arch/um/sys-i386/delay.c --- linux-2.6.10-rc3-mm1/arch/um/sys-i386/delay.c~delay-pure-arch 2004-12-21 14:46:36.607374692 +0100 +++ linux-2.6.10-rc3-mm1-root/arch/um/sys-i386/delay.c 2004-12-21 15:04:26.368897211 +0100 @@ -1,3 +1,6 @@ +#include "linux/delay.h" +#include "asm/param.h" + void __delay(unsigned long time) { /* Stolen from the i386 __loop_delay */ @@ -12,3 +15,18 @@ void __delay(unsigned long time) :"0" (time)); } +void __udelay(unsigned long usecs) +{ + int i, n; + + n = (loops_per_jiffy * HZ * usecs) / MILLION; + for(i=0;i