From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13594 invoked by alias); 6 Jul 2009 20:06:48 -0000 Received: (qmail 13584 invoked by uid 22791); 6 Jul 2009 20:06:48 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (213.235.205.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jul 2009 20:06:39 +0000 Received: from basil.firstfloor.org (p5B3CB8C9.dip0.t-ipconnect.de [91.60.184.201]) by one.firstfloor.org (Postfix) with ESMTP id 4948E1A98002; Mon, 6 Jul 2009 22:06:36 +0200 (CEST) Received: by basil.firstfloor.org (Postfix, from userid 1000) id BD5A21D024A; Mon, 6 Jul 2009 22:06:34 +0200 (CEST) Date: Mon, 06 Jul 2009 20:06:00 -0000 From: Andi Kleen To: Masami Hiramatsu Cc: Andi Kleen , Ingo Molnar , Steven Rostedt , lkml , systemtap , kvm , DLE , Christoph Hellwig , Ananth N Mavinakayanahalli , Frederic Weisbecker , Roland McGrath , Srikar Dronamraju , linux-arch@vger.kernel.org Subject: Re: [PATCH -tip -v10 5/7] x86: add pt_regs register and stack access APIs Message-ID: <20090706200634.GA1380@basil.fritz.box> References: <20090701010838.32547.62843.stgit@localhost.localdomain> <20090701010911.32547.1313.stgit@localhost.localdomain> <871votop6a.fsf@basil.nowhere.org> <4A525042.5030702@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A525042.5030702@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00028.txt.bz2 On Mon, Jul 06, 2009 at 03:28:02PM -0400, Masami Hiramatsu wrote: > I'm not so sure about your idea. > Would you mean below code? > > int offs_table[NR_REGPARMS] = { not REGPARMS of course > [0] = offsetof(struct pt_regs, di), > ... > }; > if (n < NR_REGPARMS) > return *((unsigned long *)regs + offs_table[n]); Yes. -Andi -- ak@linux.intel.com -- Speaking for myself only.