Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754800AbZGFUGn (ORCPT ); Mon, 6 Jul 2009 16:06:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754170AbZGFUGe (ORCPT ); Mon, 6 Jul 2009 16:06:34 -0400 Received: from one.firstfloor.org ([213.235.205.2]:54354 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753727AbZGFUGd (ORCPT ); Mon, 6 Jul 2009 16:06:33 -0400 Date: Mon, 6 Jul 2009 22:06:34 +0200 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) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 629 Lines: 25 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. -- 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/