Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1405865

Re: [PATCH] powerpc: inline current_stack_pointer()

From Segher Boessenkool <segher@kernel.crashing.org>
Newsgroups linux.kernel
Subject Re: [PATCH] powerpc: inline current_stack_pointer()
Date 2016-05-24 08:10 +0200
Message-ID <rCdHs-83D-7@gated-at.bofh.it> (permalink)
References <rBTIJ-3A5-5@gated-at.bofh.it> <rC5gS-2zt-13@gated-at.bofh.it> <rCdo6-7F4-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, May 24, 2016 at 07:39:59AM +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");

That one is fine, because it is a global var.

https://gcc.gnu.org/onlinedocs/gcc/Explicit-Register-Variables.html


Segher

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] powerpc: inline current_stack_pointer() Christophe Leroy <christophe.leroy@c-s.fr> - 2016-05-23 10:50 +0200
  Re: [PATCH] powerpc: inline current_stack_pointer() Segher Boessenkool <segher@kernel.crashing.org> - 2016-05-23 23:10 +0200
    Re: [PATCH] powerpc: inline current_stack_pointer() Christophe Leroy <christophe.leroy@c-s.fr> - 2016-05-24 07:50 +0200
      Re: [PATCH] powerpc: inline current_stack_pointer() Segher Boessenkool <segher@kernel.crashing.org> - 2016-05-24 08:10 +0200
  Re: [PATCH] powerpc: inline current_stack_pointer() Gabriel Paubert <paubert@iram.es> - 2016-05-24 08:50 +0200
    Re: [PATCH] powerpc: inline current_stack_pointer() Paul Mackerras <paulus@ozlabs.org> - 2016-05-25 05:50 +0200

csiph-web