Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269346AbUIBXsI (ORCPT ); Thu, 2 Sep 2004 19:48:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269345AbUIBXpM (ORCPT ); Thu, 2 Sep 2004 19:45:12 -0400 Received: from omx1-ext.sgi.com ([192.48.179.11]:58805 "EHLO omx1.americas.sgi.com") by vger.kernel.org with ESMTP id S269320AbUIBXlc (ORCPT ); Thu, 2 Sep 2004 19:41:32 -0400 Date: Thu, 2 Sep 2004 16:39:44 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: john stultz cc: lkml , tim@physik3.uni-rostock.de, george anzinger , albert@users.sourceforge.net, Ulrich.Windl@rz.uni-regensburg.de, Len Brown , linux@dominikbrodowski.de, David Mosberger , Andi Kleen , paulus@samba.org, schwidefsky@de.ibm.com, jimix@us.ibm.com, keith maanthey , greg kh , Patricia Gaughen , Chris McDermott Subject: Re: [RFC][PATCH] new timeofday core subsystem (v.A0) In-Reply-To: <1094166858.14662.367.camel@cog.beaverton.ibm.com> Message-ID: References: <1094159238.14662.318.camel@cog.beaverton.ibm.com> <1094159379.14662.322.camel@cog.beaverton.ibm.com> <1094164096.14662.345.camel@cog.beaverton.ibm.com> <1094166858.14662.367.camel@cog.beaverton.ibm.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1493 Lines: 36 On Thu, 2 Sep 2004, john stultz wrote: > Then you implement a fastcall for fastcall_readcyclonecounter(), which > in crazy ia64 asm would do something like: > > ENTRY(fastcall_readcyclonecounter) > blip // magic privledge escalation > blop // load cyclone counter into memory > bloop // copy cyclone counter back into return register > ;; > END(fastcall_readcyclonecounter) > > > This avoids 150+ lines of asm needed to re-implement the gettimeofday > math. > > However, I could be mistaken. Is something like this possible? Of course but its not a generic way of timer acccess and requires a fastcall for each timer. You still have the problem of exporting the frequency and the time offsets to user space (those also need to be kept current in order for one to be able to calculate a timer value!). The syscall/fastcall API then needs to be extended to allow for a system call to access each of the individual timers supported. And how would this be supported from user space? We link in special libraries to support for cyclone and any other supported timers into each program? I thought a kernel would provide hardware abstraction? The current IA64 fastcall timer interface is generic and is bound into the clock_gettime interface of glibc. - 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/