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 DB0B8C433E0 for ; Tue, 16 Mar 2021 06:36:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A642F65216 for ; Tue, 16 Mar 2021 06:36:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233013AbhCPGgZ (ORCPT ); Tue, 16 Mar 2021 02:36:25 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:14345 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232159AbhCPGgH (ORCPT ); Tue, 16 Mar 2021 02:36:07 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4F03R8740rz8yvq; Tue, 16 Mar 2021 14:34:12 +0800 (CST) Received: from [10.67.110.136] (10.67.110.136) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Tue, 16 Mar 2021 14:35:56 +0800 Subject: Re: [PATCH] smp: kernel/panic.c - silence warnings To: 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 14:35:57 +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: <2e1a9910-a266-f327-2f5e-413b2f60546a@infradead.org> 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 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? > > >> + */ >> +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 >> */ >> >