linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>
To: Jane Chu <jane.chu@oracle.com>, "x86@kernel.org" <x86@kernel.org>,
	"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Yasunori Gotou (Fujitsu)" <y-goto@fujitsu.com>,
	"Xiao Yang (Fujitsu)" <yangx.jy@fujitsu.com>,
	"Shiyang Ruan (Fujitsu)" <ruansy.fnst@fujitsu.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Takashi Iwai <tiwai@suse.de>, Baoquan He <bhe@redhat.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Sean Christopherson <seanjc@google.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Ira Weiny <ira.weiny@intel.com>,
	Raul E Rangel <rrangel@chromium.org>,
	Colin Foster <colin.foster@in-advantage.com>,
	Vishal Verma <vishal.l.verma@intel.com>
Subject: Re: [RFC PATCH v2 3/3] resource, crash: Make kexec_file_load support pmem
Date: Fri, 28 Apr 2023 07:10:02 +0000	[thread overview]
Message-ID: <fd853558-f5ea-c320-adf0-457092c7949e@fujitsu.com> (raw)
In-Reply-To: <7babd90e-1514-3fe5-89ad-9d06fe2b0a39@oracle.com>

Jane,


On 28/04/2023 04:41, Jane Chu wrote:
>> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
>> index cdd92ab43cda..dc9d03083565 100644
>> --- a/arch/x86/kernel/crash.c
>> +++ b/arch/x86/kernel/crash.c
>> @@ -178,6 +178,7 @@ static struct crash_mem *fill_up_crash_elf_data(void)
>>       if (!nr_ranges)
>>           return NULL;
>> +    walk_pmem_res(0, -1, &nr_ranges, get_nr_ram_ranges_callback);
> 
> So this will overwrite 'nr_ranges' produced by the previous walk_system_ram_res() call, sure it's correct?


It depends on how the callback walk_system_ram_res() handle 'nr_ranges', so it's safe for this changes IMHO.

163 static int get_nr_ram_ranges_callback(struct resource *res, void *arg)
164 {
165         unsigned int *nr_ranges = arg;
166
167         (*nr_ranges)++;
168         return 0;
169 }
170
171 /* Gather all the required information to prepare elf headers for ram regions */
172 static struct crash_mem *fill_up_crash_elf_data(void)
173 {
174         unsigned int nr_ranges = 0;
175         struct crash_mem *cmem;
176
177         walk_system_ram_res(0, -1, &nr_ranges, get_nr_ram_ranges_callback);
178         if (!nr_ranges)
179                 return NULL;
180
181         walk_pmem_res(0, -1, &nr_ranges, get_nr_ram_ranges_callback);

At last, nr_ranges = #ram_res + #pmem_res.

Thanks
Zhijian

> 
> Regards,
> -jane

  reply	other threads:[~2023-04-28  7:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27 10:18 [RFC PATCH v2 0/3] pmem memmap dump support Li Zhijian
2023-04-27 10:18 ` [RFC PATCH v2 1/3] crash: export dev memmap header to vmcoreinfo Li Zhijian
2023-04-27 10:18 ` [RFC PATCH v2 2/3] drivers/nvdimm: export memmap of namespace " Li Zhijian
2023-04-27 22:50   ` Ira Weiny
2023-04-28  7:01     ` Zhijian Li (Fujitsu)
2023-04-27 10:18 ` [RFC PATCH v2 3/3] resource, crash: Make kexec_file_load support pmem Li Zhijian
2023-04-27 11:39   ` Greg Kroah-Hartman
2023-04-28  7:36     ` Zhijian Li (Fujitsu)
2023-04-27 20:41   ` Jane Chu
2023-04-28  7:10     ` Zhijian Li (Fujitsu) [this message]
2023-04-27 10:18 ` [RFC PATCH v2 kexec-tools] kexec: Add and mark pmem region into PT_LOADs Li Zhijian
2023-04-27 10:18 ` [RFC PATCH v2 makedumpfile 1/3] elf_info.c: Introduce is_pmem_pt_load_range Li Zhijian
2023-04-27 10:18 ` [RFC PATCH v2 makedumpfile 2/3] makedumpfile.c: Exclude all pmem pages Li Zhijian
2023-04-27 10:18 ` [RFC PATCH v2 makedumpfile 3/3] makedumpfile.c: Allow excluding metadata of pmem region Li Zhijian
2023-04-28 18:59 ` [RFC PATCH v2 0/3] pmem memmap dump support Dan Williams
2023-05-08  9:45   ` Zhijian Li (Fujitsu)
2023-05-10 10:41     ` Zhijian Li (Fujitsu)
2023-05-25  5:36       ` Li, Zhijian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fd853558-f5ea-c320-adf0-457092c7949e@fujitsu.com \
    --to=lizhijian@fujitsu.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bhe@redhat.com \
    --cc=bp@alien8.de \
    --cc=colin.foster@in-advantage.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=ira.weiny@intel.com \
    --cc=jane.chu@oracle.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rrangel@chromium.org \
    --cc=ruansy.fnst@fujitsu.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.de \
    --cc=vbabka@suse.cz \
    --cc=vishal.l.verma@intel.com \
    --cc=x86@kernel.org \
    --cc=y-goto@fujitsu.com \
    --cc=yangx.jy@fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).