From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rD9xH2Q3czDqN1 for ; Tue, 24 May 2016 07:03:12 +1000 (AEST) Date: Mon, 23 May 2016 15:22:14 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc: inline current_stack_pointer() Message-ID: <20160523202214.GB11583@gate.crashing.org> References: <20160523084602.53F771A239A@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20160523084602.53F771A239A@localhost.localdomain> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, May 23, 2016 at 10:46:02AM +0200, Christophe Leroy wrote: > +static inline unsigned long current_stack_pointer(void) > +{ > + register unsigned long *ptr asm("r1"); > + > + return *ptr; > +} Register asm is only guaranteed to work as input to inline asm. NAK. Segher