From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCF76C11F68 for ; Wed, 14 Jul 2021 13:46:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6CCD613BF for ; Wed, 14 Jul 2021 13:46:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232170AbhGNNt3 (ORCPT ); Wed, 14 Jul 2021 09:49:29 -0400 Received: from mail-il1-f182.google.com ([209.85.166.182]:45679 "EHLO mail-il1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbhGNNt2 (ORCPT ); Wed, 14 Jul 2021 09:49:28 -0400 Received: by mail-il1-f182.google.com with SMTP id b6so1602025iln.12; Wed, 14 Jul 2021 06:46:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bylNDni7LUKM7pnvITfXsrZTIr6B2PAmOuvv1NHx8Os=; b=P4v8PyWHHHFOwzlU2Utzs6Lv5JtidYpO/wKUoPdmE5IgsQeBxcviWg8XJsio6vmGtK TRYg3rh6EPQBzV+yeDY2Et6TcF33dqidoxkztK2hSQdiy7/xi64DEXLcALuNem9N5JiX o0Dgl4H/1xp7iEpYJAuJH1QxPsRNSwb+Dloe5G+xWIsvZmtyg3Xp+yCemRp3B2jgLZsF 8S66UdxdaO4poFuoBXLgLEKG8Mw95mH0+xVRhYJLSMhS9gDqjrT3cLLfIujzEwSKj19b KygcGcvYt3thvtT4yvjR30LYyDE64GKeL5xaNdk+kcrTXmH1AdOagBbZfA/VjTO7SASy hZFw== X-Gm-Message-State: AOAM531joPPc+CuKm2vOT70WibT1cyPMAuPgxicja2swMgGfvZZm5BGX z2kXaAgo74YBnl35JmRNiw== X-Google-Smtp-Source: ABdhPJwzly6VLXsrTTboxhXnHeZCdEuUQxDBu27t3pSa2+1X8fR4x8BA5P9eHwkkY5vz+JeKbPGq8A== X-Received: by 2002:a92:8712:: with SMTP id m18mr6301471ild.132.1626270397009; Wed, 14 Jul 2021 06:46:37 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id t8sm1178729iog.21.2021.07.14.06.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 06:46:36 -0700 (PDT) Received: (nullmailer pid 2452887 invoked by uid 1000); Wed, 14 Jul 2021 13:46:32 -0000 Date: Wed, 14 Jul 2021 07:46:32 -0600 From: Rob Herring 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 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0721f629d5e75b7b7e655458a63cbd767baaa409.1626266516.git.geert+renesas@glider.be> Precedence: bulk List-ID: X-Mailing-List: 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 > >