From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755999Ab1DRQzo (ORCPT ); Mon, 18 Apr 2011 12:55:44 -0400 Received: from casper.infradead.org ([85.118.1.10]:52440 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755848Ab1DRQzj convert rfc822-to-8bit (ORCPT ); Mon, 18 Apr 2011 12:55:39 -0400 Subject: Re: [PATCH v3 2.6.39-rc1-tip 14/26] 14: x86: x86 specific probe handling From: Peter Zijlstra To: Srikar Dronamraju Cc: Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Masami Hiramatsu , Ananth N Mavinakayanahalli , Christoph Hellwig , Andi Kleen , Thomas Gleixner , Jonathan Corbet , Oleg Nesterov , Andrew Morton , Jim Keniston , Roland McGrath , SystemTap , LKML In-Reply-To: <20110401143517.15455.88373.sendpatchset@localhost6.localdomain6> References: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> <20110401143517.15455.88373.sendpatchset@localhost6.localdomain6> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Mon, 18 Apr 2011 18:55:00 +0200 Message-ID: <1303145700.32491.891.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2011-04-01 at 20:05 +0530, Srikar Dronamraju wrote: > +/* > + * @reg: reflects the saved state of the task > + * @vaddr: the virtual address to jump to. > + * Return 0 on success or a -ve number on error. > + */ > +void set_ip(struct pt_regs *regs, unsigned long vaddr) > +{ > + regs->ip = vaddr; > +} Since we have the cross-architecture function: instruction_pointer(struct pt_regs*) to read the thing, this ought to be called set_instruction_pointer(struct pt_regs*, unsigned long) or somesuch. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id BFE58900086 for ; Mon, 18 Apr 2011 12:55:33 -0400 (EDT) Subject: Re: [PATCH v3 2.6.39-rc1-tip 14/26] 14: x86: x86 specific probe handling From: Peter Zijlstra In-Reply-To: <20110401143517.15455.88373.sendpatchset@localhost6.localdomain6> References: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> <20110401143517.15455.88373.sendpatchset@localhost6.localdomain6> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 18 Apr 2011 18:55:00 +0200 Message-ID: <1303145700.32491.891.camel@twins> Mime-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Srikar Dronamraju Cc: Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Masami Hiramatsu , Ananth N Mavinakayanahalli , Christoph Hellwig , Andi Kleen , Thomas Gleixner , Jonathan Corbet , Oleg Nesterov , Andrew Morton , Jim Keniston , Roland McGrath , SystemTap , LKML On Fri, 2011-04-01 at 20:05 +0530, Srikar Dronamraju wrote: > +/* > + * @reg: reflects the saved state of the task > + * @vaddr: the virtual address to jump to. > + * Return 0 on success or a -ve number on error. > + */ > +void set_ip(struct pt_regs *regs, unsigned long vaddr) > +{ > + regs->ip =3D vaddr; > +}=20 Since we have the cross-architecture function: instruction_pointer(struct pt_regs*) to read the thing, this ought to be called set_instruction_pointer(struct pt_regs*, unsigned long) or somesuch. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org