LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Christophe Leroy <christophe.leroy@c-s.fr>,
	Michael Ellerman <mpe@ellerman.id.au>,
	msuchanek@suse.de, Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC WIP PATCH] powerpc/32: system call implement entry/exit logic in C
Date: Fri, 03 Apr 2020 17:33:38 +1000	[thread overview]
Message-ID: <1585898897.1jwur86s6a.astroid@bobo.none> (raw)
In-Reply-To: <059c1abd-6be2-25ea-83e0-dcd411b7951b@c-s.fr>

Christophe Leroy's on April 1, 2020 9:48 pm:
> 
> 
> Le 31/03/2020 à 17:22, Christophe Leroy a écrit :
>> That's first try to port PPC64 syscall entry/exit logic in C to PPC32.
>> I've do the minimum to get it work. I have not reworked calls
>> to sys_fork() and friends for instance.
>> 
>> For the time being, it seems to work more or less but:
>> - ping reports EINVAL on recvfrom
>> - strace shows NULL instead of strings in call like open() for instance.
> 
> For the two above problems, that's because system_call_exception() 
> doesn't set orig_gpr3 whereas DoSycall() does in entry_32.S . Is that 
> only done on PPC32 ?
> 
> With the following line at the begining of system_call_exception(), it 
> works perfectly:
> 
> 	regs->orig_gpr3 = r3;

Oh great, nice work. We should be able to make some simple helpers or
move some things a bit to reduce the amount of ifdefs in the C code.
It doesn't look too bad though.

> I will now focus on performance to see if we can do something about it.

What's the performance difference between current asm code just with
always saving NVGPRS vs C?

Thanks,
Nick


  reply	other threads:[~2020-04-03  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 15:22 [RFC WIP PATCH] powerpc/32: system call implement entry/exit logic in C Christophe Leroy
2020-04-01 11:48 ` Christophe Leroy
2020-04-03  7:33   ` Nicholas Piggin [this message]
2020-04-05 18:53     ` Christophe Leroy

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=1585898897.1jwur86s6a.astroid@bobo.none \
    --to=npiggin@gmail.com \
    --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=msuchanek@suse.de \
    --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