Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-05-04 Thread Nick Desaulniers
On Fri, Apr 30, 2021 at 2:33 PM Nick Desaulniers wrote: > > On Tue, Apr 27, 2021 at 1:42 PM Nick Desaulniers > wrote: > > > > On Mon, Apr 26, 2021 at 11:39 PM Christophe Leroy > > wrote: > > > > > > As you can see, CLANG doesn't save/restore 'lr' allthought 'lr' is > > > explicitely listed in

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-04-30 Thread Nick Desaulniers
On Tue, Apr 27, 2021 at 1:42 PM Nick Desaulniers wrote: > > On Mon, Apr 26, 2021 at 11:39 PM Christophe Leroy > wrote: > > > > As you can see, CLANG doesn't save/restore 'lr' allthought 'lr' is > > explicitely listed in the > > registers clobbered by the inline assembly: > > Ah, thanks for

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-04-27 Thread Nick Desaulniers
On Mon, Apr 26, 2021 at 11:39 PM Christophe Leroy wrote: > > > > Le 26/04/2021 à 20:50, Nathan Chancellor a écrit : > > On Sat, Mar 20, 2021 at 11:22:27PM +1100, Michael Ellerman wrote: > >> From: Christophe Leroy > >> > >> call_do_irq() and call_do_softirq() are simple enough to be > >> worth

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-04-27 Thread Christophe Leroy
Le 26/04/2021 à 20:50, Nathan Chancellor a écrit : On Sat, Mar 20, 2021 at 11:22:27PM +1100, Michael Ellerman wrote: From: Christophe Leroy call_do_irq() and call_do_softirq() are simple enough to be worth inlining. Inlining them avoids an mflr/mtlr pair plus a save/reload on stack. It

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-04-26 Thread Nathan Chancellor
On Sat, Mar 20, 2021 at 11:22:27PM +1100, Michael Ellerman wrote: > From: Christophe Leroy > > call_do_irq() and call_do_softirq() are simple enough to be > worth inlining. > > Inlining them avoids an mflr/mtlr pair plus a save/reload on stack. It > also allows GCC to keep the saved ksp_limit

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-03-30 Thread Michael Ellerman
On Sat, 20 Mar 2021 23:22:27 +1100, Michael Ellerman wrote: > call_do_irq() and call_do_softirq() are simple enough to be > worth inlining. > > Inlining them avoids an mflr/mtlr pair plus a save/reload on stack. It > also allows GCC to keep the saved ksp_limit in an nonvolatile reg. > > This is

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-03-25 Thread Segher Boessenkool
On Wed, Mar 24, 2021 at 11:26:01PM +1100, Michael Ellerman wrote: > Christophe Leroy writes: > > Hmm. It is the first time we use named parameters in powerpc assembly, > > isn't it ? > Yeah I'd like us to use it more, I think it helps readability a lot. ..in some cases. Not in most cases :-(

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-03-24 Thread Michael Ellerman
Christophe Leroy writes: > Le 20/03/2021 à 13:22, Michael Ellerman a écrit : >> From: Christophe Leroy >> >> call_do_irq() and call_do_softirq() are simple enough to be >> worth inlining. >> >> Inlining them avoids an mflr/mtlr pair plus a save/reload on stack. It >> also allows GCC to keep

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-03-22 Thread Christophe Leroy
Le 20/03/2021 à 13:22, Michael Ellerman a écrit : From: Christophe Leroy call_do_irq() and call_do_softirq() are simple enough to be worth inlining. Inlining them avoids an mflr/mtlr pair plus a save/reload on stack. It also allows GCC to keep the saved ksp_limit in an nonvolatile reg.

[PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-03-20 Thread Michael Ellerman
From: Christophe Leroy call_do_irq() and call_do_softirq() are simple enough to be worth inlining. Inlining them avoids an mflr/mtlr pair plus a save/reload on stack. It also allows GCC to keep the saved ksp_limit in an nonvolatile reg. This is inspired from S390 arch. Several other arches do