Christophe Leroy <christophe.le...@csgroup.eu> writes: > Le 20/03/2021 à 13:22, Michael Ellerman a écrit : >> From: Christophe Leroy <christophe.le...@csgroup.eu> >> >> 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. > > We don't have the ksp_limit anymore, I forgot to remove the above text.
No worries, I'll edit it when I apply it. >> This is inspired from S390 arch. Several other arches do more or >> less the same. The way sparc arch does seems odd thought. >> >> Signed-off-by: Christophe Leroy <christophe.le...@csgroup.eu> >> Signed-off-by: Michael Ellerman <m...@ellerman.id.au> >> --- >> >> v2: no change. >> v3: no change. >> v4: >> - comment reminding the purpose of the inline asm block. >> - added r2 as clobbered reg >> v5: >> - Limiting the change to PPC32 for now. >> - removed r2 from the clobbered regs list (on PPC32 r2 points to current all >> the time) >> - Removed patch 1 and merged ksp_limit handling in here. >> v6: >> - Rebase on top of merge-test (ca6e327fefb2). >> - Remove the ksp_limit stuff as it's doesn't exist anymore. >> >> v7: >> mpe: >> - Enable for 64-bit too. This all in-kernel code calling in-kernel >> code, and must use the kernel TOC. > > Great. > >> - Use named parameters for the inline asm. > > Hmm. It is the first time we use named parameters in powerpc assembly, isn't > it ? Not quite the first. See load_unaligned_zeropad(). And also my soon to be merged code in: http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210211135130.3474832-5-...@ellerman.id.au/ > I saw when investigating userspace access that x86 is using named parameters > widely. Yeah I'd like us to use it more, I think it helps readability a lot. > Wondering, how would the below look like with named parameters (from > __put_user_asm2_goto) ? > > stw%X1 %L0, %L1 Not sure, possibly that's too complicated for it :) cheers