Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp407818pxv; Wed, 14 Jul 2021 06:49:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQaCthiPKJMtCLBsof+6j3YrWCCqydSkS/vRi13mABjBDxsJ+ItN8w0NmSpmaG7ivUVTYQ X-Received: by 2002:a17:906:4745:: with SMTP id j5mr12562209ejs.75.1626270552230; Wed, 14 Jul 2021 06:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626270552; cv=none; d=google.com; s=arc-20160816; b=iaEMVakpPkgsW26ilAWm3Lh6pBGaW/vi/MbNfhaGf8R8o8I7Vm3xTUMuiGe7HJGgOa O0YQI3r1mue33izq9HRNWRlNvmpXITLZEUUn4xEIFcpswPi9o8QgIS3A/C26QEk6jXr8 wiX+6FYZmQcYrBgUyrqxiF+Gme54j7LXHkl/Y9v3ymUTIrtL1Jem61wB6oS/nsSG+9N0 7hnCjOv2q4P3uAP0h29wv5x9GMJJlUxeIQDx+wZrq9/33cCaxWUTuBnuh+VambUcvwA8 yIOMqA8QNGkmfqOakIL4ryTN8vO380vrSyvnMbUlUx3vLHOGrvGiRpIBT/ar09lOAXg6 zSmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=bylNDni7LUKM7pnvITfXsrZTIr6B2PAmOuvv1NHx8Os=; b=YFT5uGaG/fSkCpfMPRe7MlgtoHn0XN9eSLo6Wc+K5U4rtuNYHdLKWv5rm8s8pcvtaA vumUMxNNonktyIHDb2gxoJei9rg2XSTUmjOnJMFcB1TRD5G9FqK6Je5q//6CAiTiam6y 50P84aDDjQ6Tk/3LKkCktffrK0u9cWZc0qXi6/7CeOzssxgGZTpTj82Y9Vsgix7WJCgH QH568iYvCeABSuaWceiHVlMU/RTaZJGxE+tPVxvXPE75sF1tHJ1kkqsedBaEsOKrtLqu rA7OHPx1Dj0HVVj2o9fMqFnokzx200K4OurGOZGwtt7GjWZTTrBrax1kl9QbD0H7vLVx IPZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz26si2477615ejc.709.2021.07.14.06.48.46; Wed, 14 Jul 2021 06:49:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232058AbhGNNt3 (ORCPT + 99 others); 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-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 > >