Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4270036pxt; Wed, 11 Aug 2021 01:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJQy7yOQait0F4pyE1qUohXSQx3tXL5uLi9vMXBzOxzLQhqItg+WjF4kRKqZIjwdRZZIqs X-Received: by 2002:a17:906:a881:: with SMTP id ha1mr1646395ejb.33.1628672009947; Wed, 11 Aug 2021 01:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628672009; cv=none; d=google.com; s=arc-20160816; b=zCmnBaiQYrBaecS18+L6XTwqZ0zuh7v8TAQyAANOcvAs794vp0H4AyT4OSsbVyILv1 Xxvxc7fhRRqdnG8g2u278oibmByCSadllQ/xLP9LznlhN2yvG8CafbNnKDrJuCPxmGeb 4MVFZJlxPyLrmP90kD1u1bllsGpbipjHLaL6mXTv+MypMdn4fgNG5NUaglRryt+joZin D7ddR6U8cDPgPz6ZsxcwmLRmK2P61rEebQjNNdBdOC9noIs61DkLL8rrP8lZG+OGR+d5 D2f5no60P0ed+53AHbJ5Ui5JyzaIL9xUR49m8D6LaEqqcEtjA+tOfFDNxtg6ofPNTziV JjjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=I/ug6YRF9/vK1hLTwkFC/5UyAtVp93SZD99mHH7JL/I=; b=E4KZUf1h1F997xaXjKjxUCKc30MA687k8YYOzy2/4cRRR6duKbbVzCnZHRgibx7eTz rvzTCTzhOvmnaZEvee5EHvXlNgznTaZGNcvlhF5vBls51rfPHjgjVQcNYws3J8tBG+Ci Wp9TEdDsr51mWgU6zKNC3+aU+QXm14XWjtuhz8oYgyH/GDDUFRfZJQ4qq1NPm9g4524R DLPFRCWdf7hbchY80jm8I/mZwABVE9yWoa7soMcHuKZC0VeORamlsscu6Wslfm2xGx6F 6vFmCG80odcacf+r6zH5N/zcG76T67fAo/CkHP+OpbMeov3V4R9MDrH/mMMDaQ+IShIe IZ7w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw10si23929691ejc.360.2021.08.11.01.53.03; Wed, 11 Aug 2021 01:53:29 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236566AbhHKIwC (ORCPT + 99 others); Wed, 11 Aug 2021 04:52:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236356AbhHKIv6 (ORCPT ); Wed, 11 Aug 2021 04:51:58 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76D3AC061765 for ; Wed, 11 Aug 2021 01:51:35 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:438:1ff1:1071:f524]) by andre.telenet-ops.be with bizsmtp id g8rG2500S1gJxCh018rGYb; Wed, 11 Aug 2021 10:51:32 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mDjxE-001ya9-4k; Wed, 11 Aug 2021 10:51:16 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mDjxD-0058wr-AC; Wed, 11 Aug 2021 10:51:15 +0200 From: Geert Uytterhoeven To: Rob Herring , Russell King , Nicolas Pitre , Ard Biesheuvel , Linus Walleij , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Nick Kossifidis , Paul Walmsley , Palmer Dabbelt , Albert Ou , Frank Rowand , Dave Young Cc: Baoquan He , Vivek Goyal , Mike Rapoport , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, kexec@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v5 2/9] crash_dump: Make elfcorehdr address/size symbols always visible Date: Wed, 11 Aug 2021 10:51:00 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the forward declarations of elfcorehdr_addr and elfcorehdr_size, and the definitions of ELFCORE_ADDR_MAX and ELFCORE_ADDR_ERR 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 --- v5: - Make ELFCORE_ADDR_{MAX,ERR} visible, too, v4: - New. --- include/linux/crash_dump.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index a5192b718dbe4f9a..2618577a4d6da77e 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h @@ -10,13 +10,14 @@ #include /* for pgprot_t */ -#ifdef CONFIG_CRASH_DUMP +/* For IS_ENABLED(CONFIG_CRASH_DUMP) */ #define ELFCORE_ADDR_MAX (-1ULL) #define ELFCORE_ADDR_ERR (-2ULL) extern unsigned long long elfcorehdr_addr; extern unsigned long long elfcorehdr_size; +#ifdef CONFIG_CRASH_DUMP 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