Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751258AbdILFze (ORCPT ); Tue, 12 Sep 2017 01:55:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60840 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbdILFzc (ORCPT ); Tue, 12 Sep 2017 01:55:32 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2FC9B5D686 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dyoung@redhat.com Date: Tue, 12 Sep 2017 13:55:21 +0800 From: Dave Young To: AKASHI Takahiro Cc: catalin.marinas@arm.com, will.deacon@arm.com, bauerman@linux.vnet.ibm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, akpm@linux-foundation.org, mpe@ellerman.id.au, bhe@redhat.com, arnd@arndb.de, ard.biesheuvel@linaro.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/9] kexec_file: factor out crashdump elf header function from x86 Message-ID: <20170912055521.GA8787@dhcp-128-65.nay.redhat.com> References: <20170908031616.17916-1-takahiro.akashi@linaro.org> <20170908031616.17916-4-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170908031616.17916-4-takahiro.akashi@linaro.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 12 Sep 2017 05:55:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1398 Lines: 43 Hi, On 09/08/17 at 12:16pm, AKASHI Takahiro wrote: [snip] > --- a/include/linux/kexec.h > +++ b/include/linux/kexec.h > @@ -162,6 +162,25 @@ int __weak arch_kexec_walk_mem(struct kexec_buf *kbuf, > int (*func)(u64, u64, void *)); > extern int kexec_add_buffer(struct kexec_buf *kbuf); > int kexec_locate_mem_hole(struct kexec_buf *kbuf); > +#ifdef CONFIG_CRASH_CORE > +extern int prepare_elf_headers(struct kimage *image, void **addr, > + unsigned long *sz); > + > +/* This primarily represents number of split ranges due to exclusion */ > +#define CRASH_MAX_RANGES 16 > + > +struct crash_mem_range { > + u64 start, end; > +}; > + > +struct crash_mem { > + unsigned int nr_ranges; > + struct crash_mem_range ranges[CRASH_MAX_RANGES]; > +}; > + > +extern int exclude_mem_range(struct crash_mem *mem, > + unsigned long long mstart, unsigned long long mend); > +#endif /* CONFIG_CRASH_CORE */ Maybe I did not say it clear when reviewing the v1. I suggested to move the code from to kexec_file.c because the CONFIG_CRASH_CORE originally was introduced for the common code for vmcoreinfo stuff when Hari worked on sharing code between powerpc fadump and kdump. I'm not sure we need the #ifdef CONFIG_CRASH_CORE here for these kexec file load functions. Since they are already in kexec_file.c so I think no need to add the #ifdef > #endif /* CONFIG_KEXEC_FILE */ Thanks Dave