Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262116AbVAJGVE (ORCPT ); Mon, 10 Jan 2005 01:21:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262115AbVAJFjX (ORCPT ); Mon, 10 Jan 2005 00:39:23 -0500 Received: from pool-151-203-193-191.bos.east.verizon.net ([151.203.193.191]:20996 "EHLO ccure.user-mode-linux.org") by vger.kernel.org with ESMTP id S262096AbVAJFOS (ORCPT ); Mon, 10 Jan 2005 00:14:18 -0500 Message-Id: <200501100735.j0A7ZbPW005785@ccure.user-mode-linux.org> X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.1-RC1 To: akpm@osdl.org cc: linux-kernel@vger.kernel.org Subject: [PATCH 11/28] UML - Separate out the time code Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 10 Jan 2005 02:35:37 -0500 From: Jeff Dike Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4766 Lines: 151 Move the i386 __delay to sys-i386 and add an implementation for x86_64. Also get rid of the definition of um_udelay_t. Signed-off-by: Jeff Dike Index: 2.6.10/arch/um/kernel/time_kern.c =================================================================== --- 2.6.10.orig/arch/um/kernel/time_kern.c 2005-01-02 22:03:40.000000000 -0500 +++ 2.6.10/arch/um/kernel/time_kern.c 2005-01-02 22:09:23.000000000 -0500 @@ -136,22 +136,7 @@ return 0; } -/* XXX Needs to be moved under sys-i386 */ -void __delay(um_udelay_t time) -{ - /* Stolen from the i386 __loop_delay */ - int d0; - __asm__ __volatile__( - "\tjmp 1f\n" - ".align 16\n" - "1:\tjmp 2f\n" - ".align 16\n" - "2:\tdecl %0\n\tjns 2b" - :"=&a" (d0) - :"0" (time)); -} - -void __udelay(um_udelay_t usecs) +void __udelay(unsigned long usecs) { int i, n; @@ -159,7 +144,7 @@ for(i=0;i