public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Nicholas Piggin <npiggin@gmail•com>,
	Christophe Leroy <christophe.leroy@csgroup•eu>,
	linuxppc-dev@lists•ozlabs.org
Cc: Eirik Fuller <efuller@redhat•com>
Subject: Re: [PATCH v2 2/2] selftests/powerpc: Add scv versions of the basic TM syscall tests
Date: Thu, 02 Sep 2021 13:44:29 +1000	[thread overview]
Message-ID: <87o89b3ale.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <1630553190.fkqnk0by89.astroid@bobo.none>

Nicholas Piggin <npiggin@gmail•com> writes:
> Excerpts from Christophe Leroy's message of September 2, 2021 3:15 am:
>> Le 01/09/2021 à 18:54, Nicholas Piggin a écrit :
>>> The basic TM vs syscall test code hard codes an sc instruction for the
>>> system call, which fails to cover scv even when the userspace libc has
>>> support for it.
>>> 
>>> Duplicate the tests with hard coded scv variants so both are tested
>>> when possible.
>>> 
>>> Signed-off-by: Nicholas Piggin <npiggin@gmail•com>
>>> ---
>>>   .../selftests/powerpc/tm/tm-syscall-asm.S     | 46 +++++++++++++++++++
>>>   .../testing/selftests/powerpc/tm/tm-syscall.c | 36 ++++++++++++---
>>>   2 files changed, 75 insertions(+), 7 deletions(-)
>>> 
>>> diff --git a/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S b/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
>>> index bd1ca25febe4..849316831e6a 100644
>>> --- a/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
>>> +++ b/tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
>>> @@ -2,6 +2,10 @@
>>>   #include <ppc-asm.h>
>>>   #include <asm/unistd.h>
>>>   
>>> +/* ppc-asm.h does not define r0 or r1 */
>>> +#define r0 0
>>> +#define r1 1
>>> +
>> 
>> See https://github.com/gcc-mirror/gcc/blob/master/gcc/config/rs6000/ppc-asm.h
>> 
>> It doesn't not define r1 but it defines r0.
>
> Oops, I'll fix that.
>
>> And it defines 'sp' as register 1.
>
> Does userspace code typically use that? Kernel code AFAIKS does not.

Some does, but it's not used consistently IME.

I'd prefer you just use %r1.

cheers

  reply	other threads:[~2021-09-02  3:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 16:54 [PATCH v2 1/2] powerpc/64s: system call scv tabort fix for corrupt irq soft-mask state Nicholas Piggin
2021-09-01 16:54 ` [PATCH v2 2/2] selftests/powerpc: Add scv versions of the basic TM syscall tests Nicholas Piggin
2021-09-01 17:15   ` Christophe Leroy
2021-09-02  3:27     ` Nicholas Piggin
2021-09-02  3:44       ` Michael Ellerman [this message]
2021-09-02  5:36   ` Michael Ellerman
2021-09-01 17:21 ` [PATCH v2 1/2] powerpc/64s: system call scv tabort fix for corrupt irq soft-mask state Christophe Leroy
2021-09-02  3:33   ` Nicholas Piggin
2021-09-02 21:52     ` Segher Boessenkool
2021-09-02 22:20       ` Segher Boessenkool
2021-09-03  5:04         ` 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=87o89b3ale.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=christophe.leroy@csgroup$(echo .)eu \
    --cc=efuller@redhat$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=npiggin@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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