* [PATCH] smp: kernel/panic.c - silence warnings
@ 2021-03-16 4:08 He Ying
2021-03-16 5:15 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: He Ying @ 2021-03-16 4:08 UTC (permalink / raw)
To: peterz, mingo, frederic, paulmck, christophe.leroy, clg, qais.yousef
Cc: johnny.chenyi, linux-kernel
We found these warnings in kernel/panic.c by using sparse tool:
warning: symbol 'panic_smp_self_stop' was not declared.
warning: symbol 'nmi_panic_self_stop' was not declared.
warning: symbol 'crash_smp_send_stop' was not declared.
To avoid them, add declarations for these three functions in
include/linux/smp.h.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: He Ying <heying24@huawei.com>
---
include/linux/smp.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 70c6f6284dcf..861a253cc179 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -50,6 +50,14 @@ extern unsigned int total_cpus;
int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
int wait);
+/*
+ * Cpus stopping functions in panic. All have default weak definations.
+ * Architecure dependent code may override them.
+ */
+void panic_smp_self_stop(void);
+void nmi_panic_self_stop(struct pt_regs *regs);
+void crash_smp_send_stop(void);
+
/*
* Call a function on all processors
*/
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] smp: kernel/panic.c - silence warnings
2021-03-16 4:08 [PATCH] smp: kernel/panic.c - silence warnings He Ying
@ 2021-03-16 5:15 ` Randy Dunlap
2021-03-16 6:35 ` heying (H)
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2021-03-16 5:15 UTC (permalink / raw)
To: He Ying, peterz, mingo, frederic, paulmck, christophe.leroy, clg,
qais.yousef
Cc: johnny.chenyi, linux-kernel
On 3/15/21 9:08 PM, He Ying wrote:
> We found these warnings in kernel/panic.c by using sparse tool:
> warning: symbol 'panic_smp_self_stop' was not declared.
> warning: symbol 'nmi_panic_self_stop' was not declared.
> warning: symbol 'crash_smp_send_stop' was not declared.
>
> To avoid them, add declarations for these three functions in
> include/linux/smp.h.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: He Ying <heying24@huawei.com>
> ---
> include/linux/smp.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/smp.h b/include/linux/smp.h
> index 70c6f6284dcf..861a253cc179 100644
> --- a/include/linux/smp.h
> +++ b/include/linux/smp.h
> @@ -50,6 +50,14 @@ extern unsigned int total_cpus;
> int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
> int wait);
>
> +/*
> + * Cpus stopping functions in panic. All have default weak definations.
definitions.
> + * Architecure dependent code may override them.
Architecture-dependent
> + */
> +void panic_smp_self_stop(void);
> +void nmi_panic_self_stop(struct pt_regs *regs);
> +void crash_smp_send_stop(void);
> +
> /*
> * Call a function on all processors
> */
>
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] smp: kernel/panic.c - silence warnings
2021-03-16 5:15 ` Randy Dunlap
@ 2021-03-16 6:35 ` heying (H)
2021-03-16 6:58 ` Christophe Leroy
0 siblings, 1 reply; 5+ messages in thread
From: heying (H) @ 2021-03-16 6:35 UTC (permalink / raw)
To: Randy Dunlap, peterz, mingo, frederic, paulmck, christophe.leroy,
clg, qais.yousef
Cc: johnny.chenyi, linux-kernel
Thanks for your reply.
在 2021/3/16 13:15, Randy Dunlap 写道:
> On 3/15/21 9:08 PM, He Ying wrote:
>> We found these warnings in kernel/panic.c by using sparse tool:
>> warning: symbol 'panic_smp_self_stop' was not declared.
>> warning: symbol 'nmi_panic_self_stop' was not declared.
>> warning: symbol 'crash_smp_send_stop' was not declared.
>>
>> To avoid them, add declarations for these three functions in
>> include/linux/smp.h.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: He Ying <heying24@huawei.com>
>> ---
>> include/linux/smp.h | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/include/linux/smp.h b/include/linux/smp.h
>> index 70c6f6284dcf..861a253cc179 100644
>> --- a/include/linux/smp.h
>> +++ b/include/linux/smp.h
>> @@ -50,6 +50,14 @@ extern unsigned int total_cpus;
>> int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
>> int wait);
>>
>> +/*
>> + * Cpus stopping functions in panic. All have default weak definations.
> definitions.
Sorry for my typo.
>
>> + * Architecure dependent code may override them.
> Architecture-dependent
Is that necessary?
>
>
>> + */
>> +void panic_smp_self_stop(void);
>> +void nmi_panic_self_stop(struct pt_regs *regs);
>> +void crash_smp_send_stop(void);
>> +
>> /*
>> * Call a function on all processors
>> */
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] smp: kernel/panic.c - silence warnings
2021-03-16 6:35 ` heying (H)
@ 2021-03-16 6:58 ` Christophe Leroy
2021-03-16 7:13 ` heying (H)
0 siblings, 1 reply; 5+ messages in thread
From: Christophe Leroy @ 2021-03-16 6:58 UTC (permalink / raw)
To: heying (H),
Randy Dunlap, peterz, mingo, frederic, paulmck, clg, qais.yousef
Cc: johnny.chenyi, linux-kernel
Le 16/03/2021 à 07:35, heying (H) a écrit :
> Thanks for your reply.
>
>
> 在 2021/3/16 13:15, Randy Dunlap 写道:
>> On 3/15/21 9:08 PM, He Ying wrote:
>>> We found these warnings in kernel/panic.c by using sparse tool:
>>> warning: symbol 'panic_smp_self_stop' was not declared.
>>> warning: symbol 'nmi_panic_self_stop' was not declared.
>>> warning: symbol 'crash_smp_send_stop' was not declared.
>>>
>>> To avoid them, add declarations for these three functions in
>>> include/linux/smp.h.
>>>
>>> Reported-by: Hulk Robot <hulkci@huawei.com>
>>> Signed-off-by: He Ying <heying24@huawei.com>
>>> ---
>>> include/linux/smp.h | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/include/linux/smp.h b/include/linux/smp.h
>>> index 70c6f6284dcf..861a253cc179 100644
>>> --- a/include/linux/smp.h
>>> +++ b/include/linux/smp.h
>>> @@ -50,6 +50,14 @@ extern unsigned int total_cpus;
>>> int smp_call_function_single(int cpuid, smp_call_func_t func, void *info,
>>> int wait);
>>> +/*
>>> + * Cpus stopping functions in panic. All have default weak definations.
>> definitions.
> Sorry for my typo.
>>
>>> + * Architecure dependent code may override them.
>> Architecture-dependent
> Is that necessary?
Sure you are missing a 't'
Architecure ==> Architecture
>>
>>
>>> + */
>>> +void panic_smp_self_stop(void);
>>> +void nmi_panic_self_stop(struct pt_regs *regs);
>>> +void crash_smp_send_stop(void);
>>> +
>>> /*
>>> * Call a function on all processors
>>> */
>>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] smp: kernel/panic.c - silence warnings
2021-03-16 6:58 ` Christophe Leroy
@ 2021-03-16 7:13 ` heying (H)
0 siblings, 0 replies; 5+ messages in thread
From: heying (H) @ 2021-03-16 7:13 UTC (permalink / raw)
To: Christophe Leroy, Randy Dunlap, peterz, mingo, frederic, paulmck,
clg, qais.yousef
Cc: johnny.chenyi, linux-kernel
Dear Christophe and Randy,
You both are so nice. Thank you for your reply.
在 2021/3/16 14:58, Christophe Leroy 写道:
>
>
> Le 16/03/2021 à 07:35, heying (H) a écrit :
>> Thanks for your reply.
>>
>>
>> 在 2021/3/16 13:15, Randy Dunlap 写道:
>>> On 3/15/21 9:08 PM, He Ying wrote:
>>>> We found these warnings in kernel/panic.c by using sparse tool:
>>>> warning: symbol 'panic_smp_self_stop' was not declared.
>>>> warning: symbol 'nmi_panic_self_stop' was not declared.
>>>> warning: symbol 'crash_smp_send_stop' was not declared.
>>>>
>>>> To avoid them, add declarations for these three functions in
>>>> include/linux/smp.h.
>>>>
>>>> Reported-by: Hulk Robot <hulkci@huawei.com>
>>>> Signed-off-by: He Ying <heying24@huawei.com>
>>>> ---
>>>> include/linux/smp.h | 8 ++++++++
>>>> 1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/include/linux/smp.h b/include/linux/smp.h
>>>> index 70c6f6284dcf..861a253cc179 100644
>>>> --- a/include/linux/smp.h
>>>> +++ b/include/linux/smp.h
>>>> @@ -50,6 +50,14 @@ extern unsigned int total_cpus;
>>>> int smp_call_function_single(int cpuid, smp_call_func_t func,
>>>> void *info,
>>>> int wait);
>>>> +/*
>>>> + * Cpus stopping functions in panic. All have default weak
>>>> definations.
>>> definitions.
>> Sorry for my typo.
>>>
>>>> + * Architecure dependent code may override them.
>>> Architecture-dependent
>> Is that necessary?
>
> Sure you are missing a 't'
>
> Architecure ==> Architecture
Oh, a misspelling again. Sorry about that. I'll fix it.
>
>>>
>>>
>>>> + */
>>>> +void panic_smp_self_stop(void);
>>>> +void nmi_panic_self_stop(struct pt_regs *regs);
>>>> +void crash_smp_send_stop(void);
>>>> +
>>>> /*
>>>> * Call a function on all processors
>>>> */
>>>>
>>>
> .
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-16 7:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 4:08 [PATCH] smp: kernel/panic.c - silence warnings He Ying
2021-03-16 5:15 ` Randy Dunlap
2021-03-16 6:35 ` heying (H)
2021-03-16 6:58 ` Christophe Leroy
2021-03-16 7:13 ` heying (H)
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.