From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5823FC433E0 for ; Tue, 16 Mar 2021 07:15:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E21164F92 for ; Tue, 16 Mar 2021 07:15:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbhCPHNq (ORCPT ); Tue, 16 Mar 2021 03:13:46 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13623 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbhCPHNg (ORCPT ); Tue, 16 Mar 2021 03:13:36 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F04GC4P5tz17Lx4; Tue, 16 Mar 2021 15:11:31 +0800 (CST) Received: from [10.67.110.136] (10.67.110.136) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Tue, 16 Mar 2021 15:13:15 +0800 Subject: Re: [PATCH] smp: kernel/panic.c - silence warnings To: Christophe Leroy , Randy Dunlap , , , , , , CC: , References: <20210316040819.29085-1-heying24@huawei.com> <2e1a9910-a266-f327-2f5e-413b2f60546a@infradead.org> From: "heying (H)" Message-ID: Date: Tue, 16 Mar 2021 15:13:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.110.136] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>>> Signed-off-by: He Ying >>>> --- >>>>   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 >>>>    */ >>>> >>> > .