Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7066717pxb; Wed, 17 Feb 2021 23:52:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJR7Y7ivC/YPGWBXDkR59f7tu5KUnmDrJ3h45g6HsFoZ+Pk43EkKQQr+0gg9vvlNpWSIwR X-Received: by 2002:a50:ce18:: with SMTP id y24mr2932712edi.208.1613634728713; Wed, 17 Feb 2021 23:52:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613634728; cv=none; d=google.com; s=arc-20160816; b=kZvLwQZ7hZsk63tfT6bcn2TpKeBLNjIVasl1bEosdIkNGv8O+7ov6YWQLytluQukix zA5pxHKO2p/5Olbc9qmaBrhc87hFZdcIwtbog7JlZBRK4sYkE4ZEv8HNQ3jFu8AgG03x AC6JCzfaURH0su48vyKV78rBPLtFgaSnMvlxIigqpCstXmt3oAOtY1BVF7AbiKEA+BzO SLN/h2bsJGOKPtHqc3KGLb3M8vFu+sBk/Kxz1PxPbxEOUhkSogl0AgptkTXHfkdgIDL8 K8ImjjKhW4bjFhjKLUKFwR8+6xhePuWhbSbV2bcP4Y1EAtnGbLbqC9jjv/4uNf9N9KEz NWVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=pAY3MN8CWqY/eCmyp/qxj74xPv+8l8egBtWKgIqd95s=; b=0raSsTYUl8HJKT7n1rUtR6ppFnqurZMN4qZ98KoPY4Ezk30TyHsXW2oc3segc1tlEg HWUOMSmmRuvVD8qC2rNzzoH+oTTw+H5O4u+BLX/pnFi3BOoq+iZmyqI9rvp9D1f7tszT z+LCTQGygLkhWB1e5sVKOWWQR62dQJAsAfLdbpCPQVKveSdhlSbeCRy4qGKuOz9jbFq+ wUf+pOeVtRXSiHpikUwyPJAeGlrxt8oLUxe61ngZdS3IHDM156uo3ZtPVy/qZ7po3Uum pZhl3mmRQzmNvjBut1JrTcPLiC4bfSxZeWFraMrn++QudPk6c0ec+Tg6MEOszTtTOt3Q cT+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si2850859ejr.411.2021.02.17.23.51.42; Wed, 17 Feb 2021 23:52:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230505AbhBRHtj (ORCPT + 99 others); Thu, 18 Feb 2021 02:49:39 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12552 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230523AbhBRHH3 (ORCPT ); Thu, 18 Feb 2021 02:07:29 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Dh5LC29zhzMTBb; Thu, 18 Feb 2021 15:04:35 +0800 (CST) Received: from [10.174.176.191] (10.174.176.191) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Thu, 18 Feb 2021 15:06:23 +0800 Subject: Re: [PATCH v14 06/11] x86/elf: Move vmcore_elf_check_arch_cross to arch/x86/include/asm/elf.h To: Baoquan He References: <20210130071025.65258-1-chenzhou10@huawei.com> <20210130071025.65258-7-chenzhou10@huawei.com> <20210218062508.GH2871@MiWiFi-R3L-srv> CC: , , , , , , , , , , , , , , , , , , , , , , kernel test robot From: chenzhou Message-ID: Date: Thu, 18 Feb 2021 15:05:58 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20210218062508.GH2871@MiWiFi-R3L-srv> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.176.191] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/18 14:31, Baoquan He wrote: > On 01/30/21 at 03:10pm, Chen Zhou wrote: >> Move macro vmcore_elf_check_arch_cross from arch/x86/include/asm/kexec.h >> to arch/x86/include/asm/elf.h to fix the following compiling warning: >> >> make ARCH=i386 >> In file included from arch/x86/kernel/setup.c:39:0: >> ./arch/x86/include/asm/kexec.h:77:0: warning: "vmcore_elf_check_arch_cross" redefined >> # define vmcore_elf_check_arch_cross(x) ((x)->e_machine == EM_X86_64) >> >> In file included from arch/x86/kernel/setup.c:9:0: >> ./include/linux/crash_dump.h:39:0: note: this is the location of the previous definition >> #define vmcore_elf_check_arch_cross(x) 0 >> >> The root cause is that vmcore_elf_check_arch_cross under CONFIG_CRASH_CORE >> depend on CONFIG_KEXEC_CORE. Commit 2db65f1db17d ("x86: kdump: move >> reserve_crashkernel[_low]() into crash_core.c") triggered the issue. >> >> Suggested by Mike, simply move vmcore_elf_check_arch_cross from >> arch/x86/include/asm/kexec.h to arch/x86/include/asm/elf.h to fix >> the warning. >> >> Fixes: 2db65f1db17d ("x86: kdump: move reserve_crashkernel[_low]() into crash_core.c") > Where does this commit id '2db65f1db17d' come from? Here you are fixing > another pathc in the same patchset. Please merge this with patch 05/11. Yeah, the commit id is invalid, i will merge this patch with patch 05/11. Thanks, Chen Zhou > >> Reported-by: kernel test robot >> Suggested-by: Mike Rapoport >> Signed-off-by: Chen Zhou >> --- >> arch/x86/include/asm/elf.h | 3 +++ >> arch/x86/include/asm/kexec.h | 3 --- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h >> index 66bdfe838d61..5333777cc758 100644 >> --- a/arch/x86/include/asm/elf.h >> +++ b/arch/x86/include/asm/elf.h >> @@ -94,6 +94,9 @@ extern unsigned int vdso32_enabled; >> >> #define elf_check_arch(x) elf_check_arch_ia32(x) >> >> +/* We can also handle crash dumps from 64 bit kernel. */ >> +# define vmcore_elf_check_arch_cross(x) ((x)->e_machine == EM_X86_64) >> + >> /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx >> contains a pointer to a function which might be registered using `atexit'. >> This provides a mean for the dynamic linker to call DT_FINI functions for >> diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h >> index 2b18f918203e..6fcae01a9cca 100644 >> --- a/arch/x86/include/asm/kexec.h >> +++ b/arch/x86/include/asm/kexec.h >> @@ -72,9 +72,6 @@ struct kimage; >> >> /* The native architecture */ >> # define KEXEC_ARCH KEXEC_ARCH_386 >> - >> -/* We can also handle crash dumps from 64 bit kernel. */ >> -# define vmcore_elf_check_arch_cross(x) ((x)->e_machine == EM_X86_64) >> #else >> /* Maximum physical address we can use pages from */ >> # define KEXEC_SOURCE_MEMORY_LIMIT (MAXMEM-1) >> -- >> 2.20.1 >> > . >