linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Scott Wood <oss@buserror.net>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: inline current_stack_pointer()
Date: Tue, 24 May 2016 01:08:39 -0500	[thread overview]
Message-ID: <20160524060839.GA6492@gate.crashing.org> (raw)
In-Reply-To: <61305e9e-ed63-6915-709c-dd8797ff1fba@c-s.fr>

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

  reply	other threads:[~2016-05-24  6:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23  8:46 [PATCH] powerpc: inline current_stack_pointer() Christophe Leroy
2016-05-23 17:17 ` Gabriel Paubert
2016-05-24 22:21   ` Paul Mackerras
2016-05-23 20:22 ` Segher Boessenkool
2016-05-24  5:39   ` Christophe Leroy
2016-05-24  6:08     ` Segher Boessenkool [this message]
2016-05-31 10:05 ` Anton Blanchard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160524060839.GA6492@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=oss@buserror.net \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).