Hi,
> current_stack_pointeur() is a single instruction function. it
> It is not worth breaking the execution flow with a bl/blr for a
> single instruction
Check out bfe9a2cfe91a ("powerpc: Reimplement __get_SP() as a function
not a define") to see why we made it a function.
Anton
___
On Mon, May 23, 2016 at 07:17:38PM +0200, Gabriel Paubert wrote:
> On Mon, May 23, 2016 at 10:46:02AM +0200, Christophe Leroy wrote:
> > current_stack_pointeur() is a single instruction function. it
> > It is not worth breaking the execution flow with a bl/blr for a
> > single instruction
>
> Are
On Mon, May 23, 2016 at 10:46:02AM +0200, Christophe Leroy wrote:
> current_stack_pointeur() is a single instruction function. it
> It is not worth breaking the execution flow with a bl/blr for a
> single instruction
Are you sure that the result is always the same?
Calling an external function p
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
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
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
current_stack_pointeur() is a single instruction function. it
It is not worth breaking the execution flow with a bl/blr for a
single instruction
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/reg.h | 7 ++-
arch/powerpc/kernel/misc.S | 4
arch/powerpc/kernel/ppc_ksym