From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754089AbcEXFkM (ORCPT ); Tue, 24 May 2016 01:40:12 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:46892 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbcEXFkL (ORCPT ); Tue, 24 May 2016 01:40:11 -0400 Subject: Re: [PATCH] powerpc: inline current_stack_pointer() To: Segher Boessenkool References: <20160523084602.53F771A239A@localhost.localdomain> <20160523202214.GB11583@gate.crashing.org> Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Christophe Leroy Message-ID: <61305e9e-ed63-6915-709c-dd8797ff1fba@c-s.fr> Date: Tue, 24 May 2016 07:39:59 +0200 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160523202214.GB11583@gate.crashing.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 23/05/2016 à 22:22, Segher Boessenkool a écrit : > 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. > Does it mean that the following declaration in arch/powerpc/include/asm/paca.h is wrong too ? register struct paca_struct *local_paca asm("r13"); Christophe