Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3250297ybc; Thu, 14 Nov 2019 06:22:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxwyGpEKQBLKlYhU3Z+A/LWzRPLd/1rV6aYro1QFbUbWYm735e5JtzmMhYSGUwuqwtpyoAS X-Received: by 2002:a17:906:ecf5:: with SMTP id qt21mr8537757ejb.295.1573741344742; Thu, 14 Nov 2019 06:22:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573741344; cv=none; d=google.com; s=arc-20160816; b=iL5KtxIjuHwh9a6xrE5Yg3iTPfItVJJ3Hp//GhMdCgkktg+IqUayzfLRwvdoHwH7fm V29brSkvfLErq3ana60/kfzpWMxMe8l9jtgIXeiYESdPStBgwielGNgk2gkaamKfz6bF tq4kVQShwgLQlBvN7gSnbo/HqUKvnu2fRDizG49LP/kDg/9Id2mzWWzZfbDog3uTaqfU 9oiKSwpOfEF7tFllHO5ltJhBRjHGXB5X1ZCVtd8s5uk5qiQYSK2VbIkomPx9a639SeEp C5Cv7/fgYGL2HOih9FTCZbqqjY0K+aIyYLF3stOgE4oOSiIUcgJMCBYsaiNk1mt06UDp G6BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=zFtzaw5LIVkMmAtq7/jfIOHBlZTiY/lff0QrVR0Mkqs=; b=Vw6zl6zWs/ZusuITTUglDoSSmPtMfcmqCPHxuHXIK67hNDTQ93BLYAjGDH8JjKOqAg iL9n4FkXPW48IF5W1iexPLIMOqSLNWg3bUHbvJHp83N1L2lBQk98m8iAtGAykfr5dDFL qIehg3PMMeVg6NFneZUl/h4oIPyGaz4IvqfQqGjSWyo5KJFWrvBitk+yehx31ytwAYw9 WhN2fVt3nMT61g3E8r5S7byaR/B2cR0V9aW77+XeWPfFvB3Wp0gSCKXwdBjOsnltlcjK qivre3zStijOozXDiiR2HaMYhDH79A0hFk06wghb2I7qisO4xKjS2GIIFmQurNovMWK8 qw2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bimbSoD+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi3si4257443edb.331.2019.11.14.06.22.00; Thu, 14 Nov 2019 06:22:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bimbSoD+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfKNOVC (ORCPT + 99 others); Thu, 14 Nov 2019 09:21:02 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:28604 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726318AbfKNOVC (ORCPT ); Thu, 14 Nov 2019 09:21:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573741261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zFtzaw5LIVkMmAtq7/jfIOHBlZTiY/lff0QrVR0Mkqs=; b=bimbSoD+oBE06X/hlXI5IUwWW0TFc/wd5eSFpZuLq5bUmyewvaKUbvplNMi4l9WTo3L7tz Wt/wvg4vs61ChNkvvoe1gaJwkaF+bCBuAtDwKklcm5xIT2AhHfcg+HLyAcC4Lp6VsPljGp kCn7thvNfgaHt62Z7jnYbARB5DfI5VM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-431-ntacfLsrMyuJS8Oe8XRaFQ-1; Thu, 14 Nov 2019 09:20:58 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B040107B7D5; Thu, 14 Nov 2019 14:20:55 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-76.pek2.redhat.com [10.72.12.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 106E7610E5; Thu, 14 Nov 2019 14:20:45 +0000 (UTC) Subject: Re: [PATCH 3/3 v9] kexec: Fix i386 build warnings that missed declaration of struct kimage To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, bhe@redhat.com, dyoung@redhat.com, jgross@suse.com, dhowells@redhat.com, Thomas.Lendacky@amd.com, ebiederm@xmission.com, vgoyal@redhat.com, d.hatayama@fujitsu.com, horms@verge.net.au, kexec@lists.infradead.org References: <20191108090027.11082-1-lijiang@redhat.com> <20191108090027.11082-4-lijiang@redhat.com> <20191114123920.GA7222@zn.tnic> From: lijiang Message-ID: <59fbd119-495a-4d00-9738-98c22b276c1f@redhat.com> Date: Thu, 14 Nov 2019 22:20:42 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20191114123920.GA7222@zn.tnic> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: ntacfLsrMyuJS8Oe8XRaFQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =E5=9C=A8 2019=E5=B9=B411=E6=9C=8814=E6=97=A5 20:39, Borislav Petkov =E5=86= =99=E9=81=93: > On Fri, Nov 08, 2019 at 05:00:27PM +0800, Lianbo Jiang wrote: >> Kbuild test robot reported some build warnings as follow: >> >> arch/x86/include/asm/crash.h:5:32: warning: 'struct kimage' declared >> inside parameter list will not be visible outside of this definition >> or declaration >> int crash_load_segments(struct kimage *image); >> ^~~~~~ >> int crash_copy_backup_region(struct kimage *image); >> ^~~~~~ >> int crash_setup_memmap_entries(struct kimage *image, >> ^~~~~~ >> The 'struct kimage' is defined in the header file include/linux/kexec.h, >> before using it, need to include its header file or make a declaration. >> Otherwise the above warnings may be triggered. >> >> Add a declaration of struct kimage to the file arch/x86/include/asm/ >> crash.h, that will solve these compile warnings. >> >> Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system= call") >=20 > This is, of course, wrong. Your *first* patch is introducing those > warnings and I'm wondering how did you not see them during building? >=20 I really saw my building result, but kbuild reported the following messages= : vim +5 arch/x86/include/asm/crash.h dd5f726076cc76 Vivek Goyal 2014-08-08 4 =20 dd5f726076cc76 Vivek Goyal 2014-08-08 @5 int crash_load_segments(struct k= image *image); dd5f726076cc76 Vivek Goyal 2014-08-08 6 int crash_copy_backup_region(str= uct kimage *image); dd5f726076cc76 Vivek Goyal 2014-08-08 7 int crash_setup_memmap_entries(s= truct kimage *image, dd5f726076cc76 Vivek Goyal 2014-08-08 8 =09=09struct boot_params *params= ); 89f579ce99f7e0 Yi Wang 2018-11-22 9 void crash_smp_send_stop(void); dd5f726076cc76 Vivek Goyal 2014-08-08 10 =20 :::::: The code at line 5 was first introduced by commit=20 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :::::: dd5f726076cc7639d9713b334c8c133f77c6757a kexec: support for kexec on= panic using new system call ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Would you mind giving me any suggestions about this? > In file included from arch/x86/realmode/init.c:11: > ./arch/x86/include/asm/crash.h:5:32: warning: =E2=80=98struct kimage=E2= =80=99 declared inside parameter list will not be visible outside of this d= efinition or declaration > 5 | int crash_load_segments(struct kimage *image); > | ^~~~~~ > ./arch/x86/include/asm/crash.h:6:37: warning: =E2=80=98struct kimage=E2= =80=99 declared inside parameter list will not be visible outside of this d= efinition or declaration > 6 | int crash_copy_backup_region(struct kimage *image); > | ^~~~~~ > ./arch/x86/include/asm/crash.h:7:39: warning: =E2=80=98struct kimage=E2= =80=99 declared inside parameter list will not be visible outside of this d= efinition or declaration > 7 | int crash_setup_memmap_entries(struct kimage *image, > | >=20 >=20 > And that happens because you've included asm/crash.h in > arch/x86/realmode/init.c and it of course complains because it hasn't > seen that struct yet. >=20 Exactly. Last time, i fixed the warnings in my first patch, please refer to= the patch v8(resend). Link: https://lkml.kernel.org/r/20191031033517.11282-2-lijiang@redhat.com -[PATCH 1/2 RESEND v8] x86/kdump: always reserve the low 1M when the = crashkernel option is specified And kbuild said that need to add the reported-by, please refer to the follo= wing Link. Link: https://lkml.kernel.org/r/201910310233.EJRtTMWP%25lkp@intel.com > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot Any idea about this? Any suggestions will be appreciated. Thanks. Lianbo