From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Pierre Morel <pmorel@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, frankja@linux.ibm.com,
thuth@redhat.com, kvm@vger.kernel.org, cohuck@redhat.com,
david@redhat.com
Subject: Re: [kvm-unit-tests PATCH v1 2/4] s390x: lib: Move stsi_get_fc to library
Date: Mon, 9 Aug 2021 11:53:56 +0200 [thread overview]
Message-ID: <20210809115356.2412ad87@p-imbrenda> (raw)
In-Reply-To: <1628498934-20735-3-git-send-email-pmorel@linux.ibm.com>
On Mon, 9 Aug 2021 10:48:52 +0200
Pierre Morel <pmorel@linux.ibm.com> wrote:
> It's needed in multiple tests now.
>
> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
> lib/s390x/asm/arch_def.h | 16 ++++++++++++++++
> s390x/stsi.c | 16 ----------------
> 2 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h
> index 15cf7d48..57d7ddac 100644
> --- a/lib/s390x/asm/arch_def.h
> +++ b/lib/s390x/asm/arch_def.h
> @@ -328,6 +328,22 @@ static inline int stsi(void *addr, int fc, int
> sel1, int sel2) return cc;
> }
>
> +static inline unsigned long stsi_get_fc(void *addr)
> +{
> + register unsigned long r0 asm("0") = 0;
> + register unsigned long r1 asm("1") = 0;
> + int cc;
> +
> + asm volatile("stsi 0(%[addr])\n"
> + "ipm %[cc]\n"
> + "srl %[cc],28\n"
> + : "+d" (r0), [cc] "=d" (cc)
> + : "d" (r1), [addr] "a" (addr)
> + : "cc", "memory");
> + assert(!cc);
> + return r0 >> 28;
> +}
> +
> static inline int servc(uint32_t command, unsigned long sccb)
> {
> int cc;
> diff --git a/s390x/stsi.c b/s390x/stsi.c
> index 87d48047..11986d13 100644
> --- a/s390x/stsi.c
> +++ b/s390x/stsi.c
> @@ -71,22 +71,6 @@ static void test_priv(void)
> report_prefix_pop();
> }
>
> -static inline unsigned long stsi_get_fc(void *addr)
> -{
> - register unsigned long r0 asm("0") = 0;
> - register unsigned long r1 asm("1") = 0;
> - int cc;
> -
> - asm volatile("stsi 0(%[addr])\n"
> - "ipm %[cc]\n"
> - "srl %[cc],28\n"
> - : "+d" (r0), [cc] "=d" (cc)
> - : "d" (r1), [addr] "a" (addr)
> - : "cc", "memory");
> - assert(!cc);
> - return r0 >> 28;
> -}
> -
> static void test_fc(void)
> {
> report(stsi(pagebuf, 7, 0, 0) == 3, "invalid fc");
next prev parent reply other threads:[~2021-08-09 10:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 8:48 [kvm-unit-tests PATCH v1 0/4] S390x: CPU Topology Information Pierre Morel
2021-08-09 8:48 ` [kvm-unit-tests PATCH v1 1/4] s390x: lib: Add SCLP toplogy nested level Pierre Morel
2021-08-09 9:53 ` Claudio Imbrenda
2021-08-09 14:23 ` Pierre Morel
2021-08-09 8:48 ` [kvm-unit-tests PATCH v1 2/4] s390x: lib: Move stsi_get_fc to library Pierre Morel
2021-08-09 9:53 ` Claudio Imbrenda [this message]
2021-08-09 10:16 ` Janosch Frank
2021-08-09 14:23 ` Pierre Morel
2021-08-09 8:48 ` [kvm-unit-tests PATCH v1 3/4] s390x: topology: check the Perform Topology Function Pierre Morel
2021-08-09 10:03 ` Claudio Imbrenda
2021-08-09 15:24 ` Pierre Morel
2021-08-09 10:12 ` Janosch Frank
2021-08-09 15:57 ` Pierre Morel
2021-08-09 8:48 ` [kvm-unit-tests PATCH v1 4/4] s390x: Topology: checking Configuration Topology Information Pierre Morel
2021-08-09 10:22 ` Claudio Imbrenda
2021-08-09 15:59 ` Pierre Morel
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=20210809115356.2412ad87@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pmorel@linux.ibm.com \
--cc=thuth@redhat.com \
/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