From: Thomas Huth <thuth@redhat.com>
To: Pierre Morel <pmorel@linux.ibm.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, frankja@linux.ibm.com,
david@redhat.com, cohuck@redhat.com
Subject: Re: [kvm-unit-tests PATCH v3 4/9] s390x: export the clock get_clock_ms() utility
Date: Mon, 9 Dec 2019 12:42:52 +0100 [thread overview]
Message-ID: <fc6e103d-100b-151b-4a6e-359f3103d5fa@redhat.com> (raw)
In-Reply-To: <1575649588-6127-5-git-send-email-pmorel@linux.ibm.com>
On 06/12/2019 17.26, Pierre Morel wrote:
> To serve multiple times, the function get_clock_ms() is moved
> from intercept.c test to the new file asm/time.h.
>
> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> ---
> lib/s390x/asm/time.h | 27 +++++++++++++++++++++++++++
> s390x/intercept.c | 11 +----------
> 2 files changed, 28 insertions(+), 10 deletions(-)
> create mode 100644 lib/s390x/asm/time.h
>
> diff --git a/lib/s390x/asm/time.h b/lib/s390x/asm/time.h
> new file mode 100644
> index 0000000..b07ccbd
> --- /dev/null
> +++ b/lib/s390x/asm/time.h
> @@ -0,0 +1,27 @@
> +/*
> + * Clock utilities for s390
> + *
> + * Authors:
> + * Thomas Huth <thuth@redhat.com>
> + *
> + * Copied from the s390/intercept test by:
> + * Pierre Morel <pmorel@linux.ibm.com>
> + *
> + * This code is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License version 2.
> + */
> +#ifndef _ASM_S390X_TIME_H_
> +#define _ASM_S390X_TIME_H_
> +
> +static inline uint64_t get_clock_ms(void)
> +{
> + uint64_t clk;
> +
> + asm volatile(" stck %0 " : : "Q"(clk) : "memory");
> +
> + /* Bit 51 is incrememented each microsecond */
> + return (clk >> (63 - 51)) / 1000;
> +}
> +
> +
Please remove one of the two empty lines.
With that cosmetic nit fixed:
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2019-12-09 11:43 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 16:26 [kvm-unit-tests PATCH v3 0/9] s390x: Testing the Channel Subsystem I/O Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 1/9] s390x: saving regs for interrupts Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 2/9] s390x: Define the PSW bits Pierre Morel
2019-12-06 16:29 ` Thomas Huth
2019-12-09 8:53 ` Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 3/9] s390: interrupt registration Pierre Morel
2019-12-09 11:40 ` Thomas Huth
2019-12-09 16:44 ` Pierre Morel
2019-12-09 11:48 ` David Hildenbrand
2019-12-09 16:44 ` Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 4/9] s390x: export the clock get_clock_ms() utility Pierre Morel
2019-12-09 11:42 ` Thomas Huth [this message]
2019-12-09 11:49 ` David Hildenbrand
2019-12-09 16:43 ` Pierre Morel
2019-12-09 16:44 ` Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 5/9] s390x: Library resources for CSS tests Pierre Morel
2019-12-09 11:49 ` Thomas Huth
2019-12-09 16:43 ` Pierre Morel
2019-12-10 10:07 ` Pierre Morel
2019-12-10 10:28 ` Thomas Huth
2019-12-10 11:22 ` Pierre Morel
2019-12-10 11:27 ` Thomas Huth
2019-12-10 11:28 ` Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 6/9] s390x: css: stsch, enumeration test Pierre Morel
2019-12-09 11:52 ` Thomas Huth
2019-12-09 16:42 ` Pierre Morel
2019-12-09 16:49 ` Cornelia Huck
2019-12-10 8:56 ` Pierre Morel
2019-12-10 11:37 ` Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 7/9] s390x: css: msch, enable test Pierre Morel
2019-12-09 16:54 ` Cornelia Huck
2019-12-10 9:01 ` Pierre Morel
2019-12-10 9:09 ` Cornelia Huck
2019-12-10 17:35 ` Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 8/9] s390x: css: ssch/tsch with sense and interrupt Pierre Morel
2019-12-09 17:22 ` Cornelia Huck
2019-12-10 9:12 ` Pierre Morel
2019-12-06 16:26 ` [kvm-unit-tests PATCH v3 9/9] s390x: css: ping pong 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=fc6e103d-100b-151b-4a6e-359f3103d5fa@redhat.com \
--to=thuth@redhat.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 \
/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