* [PATCH] rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch.
@ 2020-11-25 4:04 Xingxing Su
2020-11-25 16:10 ` Mathieu Desnoyers
0 siblings, 1 reply; 3+ messages in thread
From: Xingxing Su @ 2020-11-25 4:04 UTC (permalink / raw)
To: Mathieu Desnoyers, Peter Zijlstra, Paul E. McKenney, Boqun Feng,
Shuah Khan
Cc: linux-kernel, linux-kselftest
Except arch x86, the function rseq_offset_deref_addv is not defined.
The function test_membarrier_manager_thread call rseq_offset_deref_addv
produces a build error.
The RSEQ_ARCH_HAS_OFFSET_DEREF_ADD should contain all the code
for the MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ.
If the other Arch implements this feature,
defined RSEQ_ARCH_HAS_OFFSET_DEREF_ADD in the header file
to ensure that this feature is available.
Following build errors:
param_test.c: In function ‘test_membarrier_worker_thread’:
param_test.c:1164:10: warning: implicit declaration of function ‘rseq_offset_deref_addv’
ret = rseq_offset_deref_addv(&args->percpu_list_ptr,
^~~~~~~~~~~~~~~~~~~~~~
/tmp/ccMj9yHJ.o: In function `test_membarrier_worker_thread':
param_test.c:1164: undefined reference to `rseq_offset_deref_addv'
param_test.c:1164: undefined reference to `rseq_offset_deref_addv'
collect2: error: ld returned 1 exit status
make: *** [/selftests/rseq/param_test_benchmark] Error 1
Signed-off-by: Xingxing Su <suxingxing@loongson.cn>
---
tools/testing/selftests/rseq/param_test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/rseq/param_test.c b/tools/testing/selftests/rseq/param_test.c
index 3845890..699ad5f 100644
--- a/tools/testing/selftests/rseq/param_test.c
+++ b/tools/testing/selftests/rseq/param_test.c
@@ -1133,6 +1133,8 @@ static int set_signal_handler(void)
return ret;
}
+/* Test MEMBARRIER_CMD_PRIVATE_RESTART_RSEQ_ON_CPU membarrier command. */
+#ifdef RSEQ_ARCH_HAS_OFFSET_DEREF_ADDV
struct test_membarrier_thread_args {
int stop;
intptr_t percpu_list_ptr;
@@ -1286,8 +1288,6 @@ void *test_membarrier_manager_thread(void *arg)
return NULL;
}
-/* Test MEMBARRIER_CMD_PRIVATE_RESTART_RSEQ_ON_CPU membarrier command. */
-#ifdef RSEQ_ARCH_HAS_OFFSET_DEREF_ADDV
void test_membarrier(void)
{
const int num_threads = opt_threads;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch.
2020-11-25 4:04 [PATCH] rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch Xingxing Su
@ 2020-11-25 16:10 ` Mathieu Desnoyers
2020-12-07 21:06 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Desnoyers @ 2020-11-25 16:10 UTC (permalink / raw)
To: Xingxing Su, shuah
Cc: Peter Zijlstra, paulmck, Boqun Feng, linux-kernel, linux-kselftest
----- On Nov 24, 2020, at 11:04 PM, Xingxing Su suxingxing@loongson.cn wrote:
> Except arch x86, the function rseq_offset_deref_addv is not defined.
> The function test_membarrier_manager_thread call rseq_offset_deref_addv
> produces a build error.
>
> The RSEQ_ARCH_HAS_OFFSET_DEREF_ADD should contain all the code
> for the MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ.
> If the other Arch implements this feature,
> defined RSEQ_ARCH_HAS_OFFSET_DEREF_ADD in the header file
> to ensure that this feature is available.
>
> Following build errors:
>
> param_test.c: In function ‘test_membarrier_worker_thread’:
> param_test.c:1164:10: warning: implicit declaration of function
> ‘rseq_offset_deref_addv’
> ret = rseq_offset_deref_addv(&args->percpu_list_ptr,
> ^~~~~~~~~~~~~~~~~~~~~~
> /tmp/ccMj9yHJ.o: In function `test_membarrier_worker_thread':
> param_test.c:1164: undefined reference to `rseq_offset_deref_addv'
> param_test.c:1164: undefined reference to `rseq_offset_deref_addv'
> collect2: error: ld returned 1 exit status
> make: *** [/selftests/rseq/param_test_benchmark] Error 1
>
> Signed-off-by: Xingxing Su <suxingxing@loongson.cn>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Shuah, can you pick up this fix please ?
Thanks,
Mathieu
> ---
> tools/testing/selftests/rseq/param_test.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/rseq/param_test.c
> b/tools/testing/selftests/rseq/param_test.c
> index 3845890..699ad5f 100644
> --- a/tools/testing/selftests/rseq/param_test.c
> +++ b/tools/testing/selftests/rseq/param_test.c
> @@ -1133,6 +1133,8 @@ static int set_signal_handler(void)
> return ret;
> }
>
> +/* Test MEMBARRIER_CMD_PRIVATE_RESTART_RSEQ_ON_CPU membarrier command. */
> +#ifdef RSEQ_ARCH_HAS_OFFSET_DEREF_ADDV
> struct test_membarrier_thread_args {
> int stop;
> intptr_t percpu_list_ptr;
> @@ -1286,8 +1288,6 @@ void *test_membarrier_manager_thread(void *arg)
> return NULL;
> }
>
> -/* Test MEMBARRIER_CMD_PRIVATE_RESTART_RSEQ_ON_CPU membarrier command. */
> -#ifdef RSEQ_ARCH_HAS_OFFSET_DEREF_ADDV
> void test_membarrier(void)
> {
> const int num_threads = opt_threads;
> --
> 1.8.3.1
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch.
2020-11-25 16:10 ` Mathieu Desnoyers
@ 2020-12-07 21:06 ` Shuah Khan
0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2020-12-07 21:06 UTC (permalink / raw)
To: Mathieu Desnoyers, Xingxing Su, shuah
Cc: Peter Zijlstra, paulmck, Boqun Feng, linux-kernel,
linux-kselftest, Shuah Khan
On 11/25/20 9:10 AM, Mathieu Desnoyers wrote:
> ----- On Nov 24, 2020, at 11:04 PM, Xingxing Su suxingxing@loongson.cn wrote:
>
>> Except arch x86, the function rseq_offset_deref_addv is not defined.
>> The function test_membarrier_manager_thread call rseq_offset_deref_addv
>> produces a build error.
>>
>> The RSEQ_ARCH_HAS_OFFSET_DEREF_ADD should contain all the code
>> for the MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ.
>> If the other Arch implements this feature,
>> defined RSEQ_ARCH_HAS_OFFSET_DEREF_ADD in the header file
>> to ensure that this feature is available.
>>
>> Following build errors:
>>
>> param_test.c: In function ‘test_membarrier_worker_thread’:
>> param_test.c:1164:10: warning: implicit declaration of function
>> ‘rseq_offset_deref_addv’
>> ret = rseq_offset_deref_addv(&args->percpu_list_ptr,
>> ^~~~~~~~~~~~~~~~~~~~~~
>> /tmp/ccMj9yHJ.o: In function `test_membarrier_worker_thread':
>> param_test.c:1164: undefined reference to `rseq_offset_deref_addv'
>> param_test.c:1164: undefined reference to `rseq_offset_deref_addv'
>> collect2: error: ld returned 1 exit status
>> make: *** [/selftests/rseq/param_test_benchmark] Error 1
>>
>> Signed-off-by: Xingxing Su <suxingxing@loongson.cn>
>
> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>
> Shuah, can you pick up this fix please ?
>
Applying for 5.11-rc1.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-07 21:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 4:04 [PATCH] rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch Xingxing Su
2020-11-25 16:10 ` Mathieu Desnoyers
2020-12-07 21:06 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).