public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: guoren@kernel.org, arnd@arndb.de, shuah@kernel.org
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org,
	"haocheng . zy" <haocheng.zy@linux.alibaba.com>,
	Mao Han <han_mao@linux.alibaba.com>,
	Guo Ren <guoren@linux.alibaba.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Elliott Hughes <enh@google.com>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/vDSO: Add riscv getcpu & gettimeofday test
Date: Wed, 2 Nov 2022 03:01:47 -0600	[thread overview]
Message-ID: <d2567709-9ce8-a49c-b073-a7d35fd2ec8f@linuxfoundation.org> (raw)
In-Reply-To: <20221102081531.882149-1-guoren@kernel.org>

On 11/2/22 02:15, guoren@kernel.org wrote:
> From: Guo Ren <guoren@kernel.org>
> 
> Enable vDSO getcpu & gettimeofday test for riscv. But only riscv64
> supports __vdso_gettimeofday and riscv32 is under development.
> 
> VERSION
> {
>          LINUX_4.15 {
>          global:
>                  __vdso_rt_sigreturn;
>                  __vdso_gettimeofday;
>                  __vdso_clock_gettime;
>                  __vdso_clock_getres;
>                  __vdso_getcpu;
>                  __vdso_flush_icache;
>          local: *;
>          };
> }
> 
> Co-developed-by: haocheng.zy <haocheng.zy@linux.alibaba.com>
> Signed-off-by: haocheng.zy <haocheng.zy@linux.alibaba.com>
> Suggested-by: Mao Han <han_mao@linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@kernel.org>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Elliott Hughes <enh@google.com>
> ---
>   tools/testing/selftests/vDSO/vdso_test_getcpu.c       | 5 +++++
>   tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 3 +++
>   2 files changed, 8 insertions(+)
> 
> diff --git a/tools/testing/selftests/vDSO/vdso_test_getcpu.c b/tools/testing/selftests/vDSO/vdso_test_getcpu.c
> index fc25ede131b8..1e474f406a87 100644
> --- a/tools/testing/selftests/vDSO/vdso_test_getcpu.c
> +++ b/tools/testing/selftests/vDSO/vdso_test_getcpu.c
> @@ -14,8 +14,13 @@
>   #include "../kselftest.h"
>   #include "parse_vdso.h"
>   
> +#if defined(__riscv)
> +const char *version = "LINUX_4.15";
> +const char *name = "__vdso_getcpu";> +#else
>   const char *version = "LINUX_2.6";
>   const char *name = "__vdso_getcpu";
> +#endif

name is same in both cases. Move it out of ifdef.

>   
>   struct getcpu_cache;
>   typedef long (*getcpu_t)(unsigned int *, unsigned int *,
> diff --git a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
> index 8ccc73ed8240..e411f287a426 100644
> --- a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
> +++ b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
> @@ -27,6 +27,9 @@
>   #if defined(__aarch64__)
>   const char *version = "LINUX_2.6.39";
>   const char *name = "__kernel_gettimeofday";
> +#elif defined(__riscv)
> +const char *version = "LINUX_4.15";
> +const char *name = "__vdso_gettimeofday";
>   #else
>   const char *version = "LINUX_2.6";
>   const char *name = "__vdso_gettimeofday";

Rest looks fine.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

      reply	other threads:[~2022-11-02  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  8:15 [PATCH] selftests/vDSO: Add riscv getcpu & gettimeofday test guoren
2022-11-02  9:01 ` Shuah Khan [this message]

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=d2567709-9ce8-a49c-b073-a7d35fd2ec8f@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=enh@google.com \
    --cc=guoren@kernel.org \
    --cc=guoren@linux.alibaba.com \
    --cc=han_mao@linux.alibaba.com \
    --cc=haocheng.zy@linux.alibaba.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=shuah@kernel.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