From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Wed, 14 Jul 2021 07:46:32 -0600 From: Rob Herring Subject: Re: [PATCH v4 01/10] crash_dump: Make elfcorehdr_{addr,size} always visible Message-ID: <20210714134632.GA2441138@robh.at.kernel.org> References: <0721f629d5e75b7b7e655458a63cbd767baaa409.1626266516.git.geert+renesas@glider.be> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0721f629d5e75b7b7e655458a63cbd767baaa409.1626266516.git.geert+renesas@glider.be> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Geert Uytterhoeven Cc: Russell King , Nicolas Pitre , Ard Biesheuvel , Linus Walleij , Catalin Marinas , Will Deacon , Nick Kossifidis , Paul Walmsley , Palmer Dabbelt , Albert Ou , Frank Rowand , Dave Young , Mike Rapoport , Baoquan He , Vivek Goyal , Andrew Morton , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kexec@lists.infradead.org, linux-mm@kvack.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org On Wed, Jul 14, 2021 at 02:50:11PM +0200, Geert Uytterhoeven wrote: > Make the forward declarations of elfcorehdr_addr and elfcorehdr_size > always available, like is done for phys_initrd_start and > phys_initrd_size. Code referring to these symbols can then just check > for IS_ENABLED(CONFIG_CRASH_DUMP), instead of requiring conditional > compilation using an #ifdef, thus preparing to increase compile > coverage. > > Suggested-by: Rob Herring > Signed-off-by: Geert Uytterhoeven > --- > v4: > - New. > --- > include/linux/crash_dump.h | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h > index a5192b718dbe4f9a..ad31893d13d634de 100644 > --- a/include/linux/crash_dump.h > +++ b/include/linux/crash_dump.h > @@ -10,13 +10,14 @@ > > #include /* for pgprot_t */ > > +/* For IS_ENABLED(CONFIG_CRASH_DUMP) */ > +extern unsigned long long elfcorehdr_addr; > +extern unsigned long long elfcorehdr_size; > + > #ifdef CONFIG_CRASH_DUMP > #define ELFCORE_ADDR_MAX (-1ULL) > #define ELFCORE_ADDR_ERR (-2ULL) Seems like these could be needed and no need to hide them, so perhaps just move the #ifdef down. > > -extern unsigned long long elfcorehdr_addr; > -extern unsigned long long elfcorehdr_size; > - > extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size); > extern void elfcorehdr_free(unsigned long long addr); > extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos); > -- > 2.25.1 > > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec