All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/vDSO: fix ABI selftest on riscv
@ 2021-02-04 14:50 ` Tobias Klauser
  0 siblings, 0 replies; 14+ messages in thread
From: Tobias Klauser @ 2021-02-04 14:50 UTC (permalink / raw)
  To: Shuah Khan, Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Vincenzo Frascino, linux-kselftest, linux-kernel, linux-riscv

Only older versions of the RISC-V GCC toolchain define __riscv__. Check
for __riscv as well, which is used by newer GCC toolchains. Also set
VDSO_32BIT based on __riscv_xlen.

Before (on riscv64):

$ ./vdso_test_abi
[vDSO kselftest] VDSO_VERSION: LINUX_4
Could not find __vdso_gettimeofday
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_REALTIME [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_BOOTTIME [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_TAI [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_REALTIME_COARSE [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_MONOTONIC [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_MONOTONIC_RAW [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_MONOTONIC_COARSE [PASS]
Could not find __vdso_time

After (on riscv32):

$ ./vdso_test_abi
[vDSO kselftest] VDSO_VERSION: LINUX_4.15
The time is 1612449376.015086
The time is 1612449376.18340784
The resolution is 0 1
clock_id: CLOCK_REALTIME [PASS]
The time is 774.842586182
The resolution is 0 1
clock_id: CLOCK_BOOTTIME [PASS]
The time is 1612449376.22536565
The resolution is 0 1
clock_id: CLOCK_TAI [PASS]
The time is 1612449376.20885172
The resolution is 0 4000000
clock_id: CLOCK_REALTIME_COARSE [PASS]
The time is 774.845491269
The resolution is 0 1
clock_id: CLOCK_MONOTONIC [PASS]
The time is 774.849534200
The resolution is 0 1
clock_id: CLOCK_MONOTONIC_RAW [PASS]
The time is 774.842139684
The resolution is 0 4000000
clock_id: CLOCK_MONOTONIC_COARSE [PASS]
Could not find __vdso_time

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 tools/testing/selftests/vDSO/vdso_config.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
index 6a6fe8d4ff55..6188b16827d1 100644
--- a/tools/testing/selftests/vDSO/vdso_config.h
+++ b/tools/testing/selftests/vDSO/vdso_config.h
@@ -47,10 +47,12 @@
 #elif defined(__x86_64__)
 #define VDSO_VERSION		0
 #define VDSO_NAMES		1
-#elif defined(__riscv__)
+#elif defined(__riscv__) || defined(__riscv)
 #define VDSO_VERSION		5
 #define VDSO_NAMES		1
+#if __riscv_xlen == 32
 #define VDSO_32BIT		1
+#endif
 #else /* nds32 */
 #define VDSO_VERSION		4
 #define VDSO_NAMES		1
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] selftests/vDSO: fix ABI selftest on riscv
@ 2021-02-04 14:50 ` Tobias Klauser
  0 siblings, 0 replies; 14+ messages in thread
From: Tobias Klauser @ 2021-02-04 14:50 UTC (permalink / raw)
  To: Shuah Khan, Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: linux-riscv, Vincenzo Frascino, linux-kernel, linux-kselftest

Only older versions of the RISC-V GCC toolchain define __riscv__. Check
for __riscv as well, which is used by newer GCC toolchains. Also set
VDSO_32BIT based on __riscv_xlen.

Before (on riscv64):

$ ./vdso_test_abi
[vDSO kselftest] VDSO_VERSION: LINUX_4
Could not find __vdso_gettimeofday
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_REALTIME [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_BOOTTIME [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_TAI [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_REALTIME_COARSE [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_MONOTONIC [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_MONOTONIC_RAW [PASS]
Could not find __vdso_clock_gettime
Could not find __vdso_clock_getres
clock_id: CLOCK_MONOTONIC_COARSE [PASS]
Could not find __vdso_time

After (on riscv32):

$ ./vdso_test_abi
[vDSO kselftest] VDSO_VERSION: LINUX_4.15
The time is 1612449376.015086
The time is 1612449376.18340784
The resolution is 0 1
clock_id: CLOCK_REALTIME [PASS]
The time is 774.842586182
The resolution is 0 1
clock_id: CLOCK_BOOTTIME [PASS]
The time is 1612449376.22536565
The resolution is 0 1
clock_id: CLOCK_TAI [PASS]
The time is 1612449376.20885172
The resolution is 0 4000000
clock_id: CLOCK_REALTIME_COARSE [PASS]
The time is 774.845491269
The resolution is 0 1
clock_id: CLOCK_MONOTONIC [PASS]
The time is 774.849534200
The resolution is 0 1
clock_id: CLOCK_MONOTONIC_RAW [PASS]
The time is 774.842139684
The resolution is 0 4000000
clock_id: CLOCK_MONOTONIC_COARSE [PASS]
Could not find __vdso_time

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 tools/testing/selftests/vDSO/vdso_config.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
index 6a6fe8d4ff55..6188b16827d1 100644
--- a/tools/testing/selftests/vDSO/vdso_config.h
+++ b/tools/testing/selftests/vDSO/vdso_config.h
@@ -47,10 +47,12 @@
 #elif defined(__x86_64__)
 #define VDSO_VERSION		0
 #define VDSO_NAMES		1
-#elif defined(__riscv__)
+#elif defined(__riscv__) || defined(__riscv)
 #define VDSO_VERSION		5
 #define VDSO_NAMES		1
+#if __riscv_xlen == 32
 #define VDSO_32BIT		1
+#endif
 #else /* nds32 */
 #define VDSO_VERSION		4
 #define VDSO_NAMES		1
-- 
2.30.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
  2021-02-04 14:50 ` Tobias Klauser
@ 2021-02-05  7:06   ` Palmer Dabbelt
  -1 siblings, 0 replies; 14+ messages in thread
From: Palmer Dabbelt @ 2021-02-05  7:06 UTC (permalink / raw)
  To: tklauser, shuah
  Cc: Paul Walmsley, aou, vincenzo.frascino, linux-kselftest,
	linux-kernel, linux-riscv

On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
> Only older versions of the RISC-V GCC toolchain define __riscv__. Check
> for __riscv as well, which is used by newer GCC toolchains. Also set
> VDSO_32BIT based on __riscv_xlen.
>
> Before (on riscv64):
>
> $ ./vdso_test_abi
> [vDSO kselftest] VDSO_VERSION: LINUX_4
> Could not find __vdso_gettimeofday
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_REALTIME [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_BOOTTIME [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_TAI [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_REALTIME_COARSE [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_MONOTONIC [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_MONOTONIC_RAW [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_MONOTONIC_COARSE [PASS]
> Could not find __vdso_time
>
> After (on riscv32):
>
> $ ./vdso_test_abi
> [vDSO kselftest] VDSO_VERSION: LINUX_4.15
> The time is 1612449376.015086
> The time is 1612449376.18340784
> The resolution is 0 1
> clock_id: CLOCK_REALTIME [PASS]
> The time is 774.842586182
> The resolution is 0 1
> clock_id: CLOCK_BOOTTIME [PASS]
> The time is 1612449376.22536565
> The resolution is 0 1
> clock_id: CLOCK_TAI [PASS]
> The time is 1612449376.20885172
> The resolution is 0 4000000
> clock_id: CLOCK_REALTIME_COARSE [PASS]
> The time is 774.845491269
> The resolution is 0 1
> clock_id: CLOCK_MONOTONIC [PASS]
> The time is 774.849534200
> The resolution is 0 1
> clock_id: CLOCK_MONOTONIC_RAW [PASS]
> The time is 774.842139684
> The resolution is 0 4000000
> clock_id: CLOCK_MONOTONIC_COARSE [PASS]
> Could not find __vdso_time
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  tools/testing/selftests/vDSO/vdso_config.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
> index 6a6fe8d4ff55..6188b16827d1 100644
> --- a/tools/testing/selftests/vDSO/vdso_config.h
> +++ b/tools/testing/selftests/vDSO/vdso_config.h
> @@ -47,10 +47,12 @@
>  #elif defined(__x86_64__)
>  #define VDSO_VERSION		0
>  #define VDSO_NAMES		1
> -#elif defined(__riscv__)
> +#elif defined(__riscv__) || defined(__riscv)
>  #define VDSO_VERSION		5
>  #define VDSO_NAMES		1
> +#if __riscv_xlen == 32
>  #define VDSO_32BIT		1
> +#endif
>  #else /* nds32 */
>  #define VDSO_VERSION		4
>  #define VDSO_NAMES		1

Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

Not sure if you want this through the RISC-V tree, so I'm leaving it out for
now and assuming it'll go through a kselftest tree.

Thanks!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
@ 2021-02-05  7:06   ` Palmer Dabbelt
  0 siblings, 0 replies; 14+ messages in thread
From: Palmer Dabbelt @ 2021-02-05  7:06 UTC (permalink / raw)
  To: tklauser, shuah
  Cc: aou, linux-kernel, linux-kselftest, Paul Walmsley, linux-riscv,
	vincenzo.frascino

On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
> Only older versions of the RISC-V GCC toolchain define __riscv__. Check
> for __riscv as well, which is used by newer GCC toolchains. Also set
> VDSO_32BIT based on __riscv_xlen.
>
> Before (on riscv64):
>
> $ ./vdso_test_abi
> [vDSO kselftest] VDSO_VERSION: LINUX_4
> Could not find __vdso_gettimeofday
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_REALTIME [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_BOOTTIME [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_TAI [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_REALTIME_COARSE [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_MONOTONIC [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_MONOTONIC_RAW [PASS]
> Could not find __vdso_clock_gettime
> Could not find __vdso_clock_getres
> clock_id: CLOCK_MONOTONIC_COARSE [PASS]
> Could not find __vdso_time
>
> After (on riscv32):
>
> $ ./vdso_test_abi
> [vDSO kselftest] VDSO_VERSION: LINUX_4.15
> The time is 1612449376.015086
> The time is 1612449376.18340784
> The resolution is 0 1
> clock_id: CLOCK_REALTIME [PASS]
> The time is 774.842586182
> The resolution is 0 1
> clock_id: CLOCK_BOOTTIME [PASS]
> The time is 1612449376.22536565
> The resolution is 0 1
> clock_id: CLOCK_TAI [PASS]
> The time is 1612449376.20885172
> The resolution is 0 4000000
> clock_id: CLOCK_REALTIME_COARSE [PASS]
> The time is 774.845491269
> The resolution is 0 1
> clock_id: CLOCK_MONOTONIC [PASS]
> The time is 774.849534200
> The resolution is 0 1
> clock_id: CLOCK_MONOTONIC_RAW [PASS]
> The time is 774.842139684
> The resolution is 0 4000000
> clock_id: CLOCK_MONOTONIC_COARSE [PASS]
> Could not find __vdso_time
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  tools/testing/selftests/vDSO/vdso_config.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h
> index 6a6fe8d4ff55..6188b16827d1 100644
> --- a/tools/testing/selftests/vDSO/vdso_config.h
> +++ b/tools/testing/selftests/vDSO/vdso_config.h
> @@ -47,10 +47,12 @@
>  #elif defined(__x86_64__)
>  #define VDSO_VERSION		0
>  #define VDSO_NAMES		1
> -#elif defined(__riscv__)
> +#elif defined(__riscv__) || defined(__riscv)
>  #define VDSO_VERSION		5
>  #define VDSO_NAMES		1
> +#if __riscv_xlen == 32
>  #define VDSO_32BIT		1
> +#endif
>  #else /* nds32 */
>  #define VDSO_VERSION		4
>  #define VDSO_NAMES		1

Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

Not sure if you want this through the RISC-V tree, so I'm leaving it out for
now and assuming it'll go through a kselftest tree.

Thanks!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
  2021-02-05  7:06   ` Palmer Dabbelt
@ 2021-02-05  7:57     ` Tobias Klauser
  -1 siblings, 0 replies; 14+ messages in thread
From: Tobias Klauser @ 2021-02-05  7:57 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: shuah, Paul Walmsley, aou, vincenzo.frascino, linux-kselftest,
	linux-kernel, linux-riscv

On 2021-02-05 at 08:06:37 +0100, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:

[...]

> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

Thank you!

> Not sure if you want this through the RISC-V tree, so I'm leaving it out for
> now and assuming it'll go through a kselftest tree.

Either way is fine for me.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
@ 2021-02-05  7:57     ` Tobias Klauser
  0 siblings, 0 replies; 14+ messages in thread
From: Tobias Klauser @ 2021-02-05  7:57 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: aou, linux-kernel, linux-kselftest, Paul Walmsley, linux-riscv,
	vincenzo.frascino, shuah

On 2021-02-05 at 08:06:37 +0100, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:

[...]

> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

Thank you!

> Not sure if you want this through the RISC-V tree, so I'm leaving it out for
> now and assuming it'll go through a kselftest tree.

Either way is fine for me.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
  2021-02-05  7:06   ` Palmer Dabbelt
@ 2021-02-05 11:12     ` Vincenzo Frascino
  -1 siblings, 0 replies; 14+ messages in thread
From: Vincenzo Frascino @ 2021-02-05 11:12 UTC (permalink / raw)
  To: Palmer Dabbelt, tklauser, shuah
  Cc: Paul Walmsley, aou, linux-kselftest, linux-kernel, linux-riscv

On 2/5/21 7:06 AM, Palmer Dabbelt wrote:
> On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
>> Only older versions of the RISC-V GCC toolchain define __riscv__. Check
>> for __riscv as well, which is used by newer GCC toolchains. Also set
>> VDSO_32BIT based on __riscv_xlen.
>>
>> Before (on riscv64):
>>
>> $ ./vdso_test_abi
>> [vDSO kselftest] VDSO_VERSION: LINUX_4
>> Could not find __vdso_gettimeofday
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_REALTIME [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_BOOTTIME [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_TAI [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_REALTIME_COARSE [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_MONOTONIC [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_MONOTONIC_RAW [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_MONOTONIC_COARSE [PASS]
>> Could not find __vdso_time
>>
>> After (on riscv32):
>>
>> $ ./vdso_test_abi
>> [vDSO kselftest] VDSO_VERSION: LINUX_4.15
>> The time is 1612449376.015086
>> The time is 1612449376.18340784
>> The resolution is 0 1
>> clock_id: CLOCK_REALTIME [PASS]
>> The time is 774.842586182
>> The resolution is 0 1
>> clock_id: CLOCK_BOOTTIME [PASS]
>> The time is 1612449376.22536565
>> The resolution is 0 1
>> clock_id: CLOCK_TAI [PASS]
>> The time is 1612449376.20885172
>> The resolution is 0 4000000
>> clock_id: CLOCK_REALTIME_COARSE [PASS]
>> The time is 774.845491269
>> The resolution is 0 1
>> clock_id: CLOCK_MONOTONIC [PASS]
>> The time is 774.849534200
>> The resolution is 0 1
>> clock_id: CLOCK_MONOTONIC_RAW [PASS]
>> The time is 774.842139684
>> The resolution is 0 4000000
>> clock_id: CLOCK_MONOTONIC_COARSE [PASS]
>> Could not find __vdso_time
>>
>> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
>> ---
>>  tools/testing/selftests/vDSO/vdso_config.h | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/vDSO/vdso_config.h
>> b/tools/testing/selftests/vDSO/vdso_config.h
>> index 6a6fe8d4ff55..6188b16827d1 100644
>> --- a/tools/testing/selftests/vDSO/vdso_config.h
>> +++ b/tools/testing/selftests/vDSO/vdso_config.h
>> @@ -47,10 +47,12 @@
>>  #elif defined(__x86_64__)
>>  #define VDSO_VERSION        0
>>  #define VDSO_NAMES        1
>> -#elif defined(__riscv__)
>> +#elif defined(__riscv__) || defined(__riscv)
>>  #define VDSO_VERSION        5
>>  #define VDSO_NAMES        1
>> +#if __riscv_xlen == 32
>>  #define VDSO_32BIT        1
>> +#endif
>>  #else /* nds32 */
>>  #define VDSO_VERSION        4
>>  #define VDSO_NAMES        1
> 
> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
>

Acked-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

> Not sure if you want this through the RISC-V tree, so I'm leaving it out for
> now and assuming it'll go through a kselftest tree.
> 
> Thanks!

-- 
Regards,
Vincenzo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
@ 2021-02-05 11:12     ` Vincenzo Frascino
  0 siblings, 0 replies; 14+ messages in thread
From: Vincenzo Frascino @ 2021-02-05 11:12 UTC (permalink / raw)
  To: Palmer Dabbelt, tklauser, shuah
  Cc: linux-riscv, aou, linux-kernel, linux-kselftest, Paul Walmsley

On 2/5/21 7:06 AM, Palmer Dabbelt wrote:
> On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
>> Only older versions of the RISC-V GCC toolchain define __riscv__. Check
>> for __riscv as well, which is used by newer GCC toolchains. Also set
>> VDSO_32BIT based on __riscv_xlen.
>>
>> Before (on riscv64):
>>
>> $ ./vdso_test_abi
>> [vDSO kselftest] VDSO_VERSION: LINUX_4
>> Could not find __vdso_gettimeofday
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_REALTIME [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_BOOTTIME [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_TAI [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_REALTIME_COARSE [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_MONOTONIC [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_MONOTONIC_RAW [PASS]
>> Could not find __vdso_clock_gettime
>> Could not find __vdso_clock_getres
>> clock_id: CLOCK_MONOTONIC_COARSE [PASS]
>> Could not find __vdso_time
>>
>> After (on riscv32):
>>
>> $ ./vdso_test_abi
>> [vDSO kselftest] VDSO_VERSION: LINUX_4.15
>> The time is 1612449376.015086
>> The time is 1612449376.18340784
>> The resolution is 0 1
>> clock_id: CLOCK_REALTIME [PASS]
>> The time is 774.842586182
>> The resolution is 0 1
>> clock_id: CLOCK_BOOTTIME [PASS]
>> The time is 1612449376.22536565
>> The resolution is 0 1
>> clock_id: CLOCK_TAI [PASS]
>> The time is 1612449376.20885172
>> The resolution is 0 4000000
>> clock_id: CLOCK_REALTIME_COARSE [PASS]
>> The time is 774.845491269
>> The resolution is 0 1
>> clock_id: CLOCK_MONOTONIC [PASS]
>> The time is 774.849534200
>> The resolution is 0 1
>> clock_id: CLOCK_MONOTONIC_RAW [PASS]
>> The time is 774.842139684
>> The resolution is 0 4000000
>> clock_id: CLOCK_MONOTONIC_COARSE [PASS]
>> Could not find __vdso_time
>>
>> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
>> ---
>>  tools/testing/selftests/vDSO/vdso_config.h | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/vDSO/vdso_config.h
>> b/tools/testing/selftests/vDSO/vdso_config.h
>> index 6a6fe8d4ff55..6188b16827d1 100644
>> --- a/tools/testing/selftests/vDSO/vdso_config.h
>> +++ b/tools/testing/selftests/vDSO/vdso_config.h
>> @@ -47,10 +47,12 @@
>>  #elif defined(__x86_64__)
>>  #define VDSO_VERSION        0
>>  #define VDSO_NAMES        1
>> -#elif defined(__riscv__)
>> +#elif defined(__riscv__) || defined(__riscv)
>>  #define VDSO_VERSION        5
>>  #define VDSO_NAMES        1
>> +#if __riscv_xlen == 32
>>  #define VDSO_32BIT        1
>> +#endif
>>  #else /* nds32 */
>>  #define VDSO_VERSION        4
>>  #define VDSO_NAMES        1
> 
> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
>

Acked-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

> Not sure if you want this through the RISC-V tree, so I'm leaving it out for
> now and assuming it'll go through a kselftest tree.
> 
> Thanks!

-- 
Regards,
Vincenzo

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
  2021-02-05  7:57     ` Tobias Klauser
@ 2021-02-08 23:37       ` Shuah Khan
  -1 siblings, 0 replies; 14+ messages in thread
From: Shuah Khan @ 2021-02-08 23:37 UTC (permalink / raw)
  To: Tobias Klauser, Palmer Dabbelt
  Cc: shuah, Paul Walmsley, aou, vincenzo.frascino, linux-kselftest,
	linux-kernel, linux-riscv, Shuah Khan

On 2/5/21 12:57 AM, Tobias Klauser wrote:
> On 2021-02-05 at 08:06:37 +0100, Palmer Dabbelt <palmer@dabbelt.com> wrote:
>> On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
> 
> [...]
> 
>> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
>> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
> 
> Thank you!
> 
>> Not sure if you want this through the RISC-V tree, so I'm leaving it out for
>> now and assuming it'll go through a kselftest tree.
> 
> Either way is fine for me.
> 

Thank you. Applied to linux-kselftest next for 5.12-rc1

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
@ 2021-02-08 23:37       ` Shuah Khan
  0 siblings, 0 replies; 14+ messages in thread
From: Shuah Khan @ 2021-02-08 23:37 UTC (permalink / raw)
  To: Tobias Klauser, Palmer Dabbelt
  Cc: aou, Shuah Khan, linux-kernel, linux-kselftest, Paul Walmsley,
	linux-riscv, vincenzo.frascino, shuah

On 2/5/21 12:57 AM, Tobias Klauser wrote:
> On 2021-02-05 at 08:06:37 +0100, Palmer Dabbelt <palmer@dabbelt.com> wrote:
>> On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
> 
> [...]
> 
>> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
>> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
> 
> Thank you!
> 
>> Not sure if you want this through the RISC-V tree, so I'm leaving it out for
>> now and assuming it'll go through a kselftest tree.
> 
> Either way is fine for me.
> 

Thank you. Applied to linux-kselftest next for 5.12-rc1

thanks,
-- Shuah

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
  2021-02-08 23:37       ` Shuah Khan
@ 2021-02-09  1:55         ` Palmer Dabbelt
  -1 siblings, 0 replies; 14+ messages in thread
From: Palmer Dabbelt @ 2021-02-09  1:55 UTC (permalink / raw)
  To: skhan
  Cc: tklauser, shuah, Paul Walmsley, aou, vincenzo.frascino,
	linux-kselftest, linux-kernel, linux-riscv, skhan

On Mon, 08 Feb 2021 15:37:24 PST (-0800), skhan@linuxfoundation.org wrote:
> On 2/5/21 12:57 AM, Tobias Klauser wrote:
>> On 2021-02-05 at 08:06:37 +0100, Palmer Dabbelt <palmer@dabbelt.com> wrote:
>>> On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
>>
>> [...]
>>
>>> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
>>> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
>>
>> Thank you!
>>
>>> Not sure if you want this through the RISC-V tree, so I'm leaving it out for
>>> now and assuming it'll go through a kselftest tree.
>>
>> Either way is fine for me.
>>
>
> Thank you. Applied to linux-kselftest next for 5.12-rc1

Thanks!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
@ 2021-02-09  1:55         ` Palmer Dabbelt
  0 siblings, 0 replies; 14+ messages in thread
From: Palmer Dabbelt @ 2021-02-09  1:55 UTC (permalink / raw)
  To: skhan
  Cc: aou, skhan, linux-kernel, linux-kselftest, Paul Walmsley,
	tklauser, vincenzo.frascino, shuah, linux-riscv

On Mon, 08 Feb 2021 15:37:24 PST (-0800), skhan@linuxfoundation.org wrote:
> On 2/5/21 12:57 AM, Tobias Klauser wrote:
>> On 2021-02-05 at 08:06:37 +0100, Palmer Dabbelt <palmer@dabbelt.com> wrote:
>>> On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
>>
>> [...]
>>
>>> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
>>> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
>>
>> Thank you!
>>
>>> Not sure if you want this through the RISC-V tree, so I'm leaving it out for
>>> now and assuming it'll go through a kselftest tree.
>>
>> Either way is fine for me.
>>
>
> Thank you. Applied to linux-kselftest next for 5.12-rc1

Thanks!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
  2021-02-08 23:37       ` Shuah Khan
@ 2021-02-10  8:06         ` Tobias Klauser
  -1 siblings, 0 replies; 14+ messages in thread
From: Tobias Klauser @ 2021-02-10  8:06 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Palmer Dabbelt, shuah, Paul Walmsley, aou, vincenzo.frascino,
	linux-kselftest, linux-kernel, linux-riscv

On 2021-02-09 at 00:37:24 +0100, Shuah Khan <skhan@linuxfoundation.org> wrote:
> On 2/5/21 12:57 AM, Tobias Klauser wrote:
> > On 2021-02-05 at 08:06:37 +0100, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> > > On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
> > 
> > [...]
> > 
> > > Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
> > > Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
> > 
> > Thank you!
> > 
> > > Not sure if you want this through the RISC-V tree, so I'm leaving it out for
> > > now and assuming it'll go through a kselftest tree.
> > 
> > Either way is fine for me.
> > 
> 
> Thank you. Applied to linux-kselftest next for 5.12-rc1

Thank you Shuah!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] selftests/vDSO: fix ABI selftest on riscv
@ 2021-02-10  8:06         ` Tobias Klauser
  0 siblings, 0 replies; 14+ messages in thread
From: Tobias Klauser @ 2021-02-10  8:06 UTC (permalink / raw)
  To: Shuah Khan
  Cc: aou, linux-kernel, Palmer Dabbelt, linux-kselftest,
	Paul Walmsley, linux-riscv, vincenzo.frascino, shuah

On 2021-02-09 at 00:37:24 +0100, Shuah Khan <skhan@linuxfoundation.org> wrote:
> On 2/5/21 12:57 AM, Tobias Klauser wrote:
> > On 2021-02-05 at 08:06:37 +0100, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> > > On Thu, 04 Feb 2021 06:50:42 PST (-0800), tklauser@distanz.ch wrote:
> > 
> > [...]
> > 
> > > Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
> > > Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
> > 
> > Thank you!
> > 
> > > Not sure if you want this through the RISC-V tree, so I'm leaving it out for
> > > now and assuming it'll go through a kselftest tree.
> > 
> > Either way is fine for me.
> > 
> 
> Thank you. Applied to linux-kselftest next for 5.12-rc1

Thank you Shuah!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-02-10  8:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 14:50 [PATCH] selftests/vDSO: fix ABI selftest on riscv Tobias Klauser
2021-02-04 14:50 ` Tobias Klauser
2021-02-05  7:06 ` Palmer Dabbelt
2021-02-05  7:06   ` Palmer Dabbelt
2021-02-05  7:57   ` Tobias Klauser
2021-02-05  7:57     ` Tobias Klauser
2021-02-08 23:37     ` Shuah Khan
2021-02-08 23:37       ` Shuah Khan
2021-02-09  1:55       ` Palmer Dabbelt
2021-02-09  1:55         ` Palmer Dabbelt
2021-02-10  8:06       ` Tobias Klauser
2021-02-10  8:06         ` Tobias Klauser
2021-02-05 11:12   ` Vincenzo Frascino
2021-02-05 11:12     ` Vincenzo Frascino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.